Page 1 of 1

Php_support in Domoticz server?

Posted: Saturday 23 April 2016 14:44
by juankar
Hello
Is it planning the support for php in domoticz integrated web server?

Thanks

Re: Php_support in Domoticz server?

Posted: Saturday 23 April 2016 15:04
by Egregius
To run scripts or to host pages?
Either install php5 and/or apache2/nginx.

Re: Php_support in Domoticz server?

Posted: Saturday 23 April 2016 19:31
by juankar
For running php pages.
But Domoticz always runs its own web server and set another serve on same ip and port....
The only way I can see is nginx. I'll investigate it.

Thanks

Re: Php_support in Domoticz server?

Posted: Saturday 23 April 2016 21:55
by Egregius
You can easily do it by running on different port numbers.

Re: Php_support in Domoticz server?

Posted: Sunday 24 April 2016 19:34
by juankar
Tanks, I've got it!!
I've used Apache proxy, I have this server installed so ...
I've used port 80, it canbe used any other 8090, 8100 ... not the same as domoticz

Code: Select all

<VirtualHost *:80>
#Path to Domoticz www
 DocumentRoot /opt/domoticz/www
#Don't proxy *.php, these files will pass trough apache server
 ProxyRequests  off
 ProxyPassMatch ^/(.*\.php)$ !
#Redirect every call to domoticz www (running in port 8080)
 ProxyPass / http://127.0.0.1:8080/
 ProxyPassReverse / http://127.0.0.1:8080/
 ProxyPreserveHost on
 <Proxy *>
 Order allow,deny
 Allow from all
 </Proxy>
 ErrorLog  ${APACHE_LOG_DIR}/error.log
 CustomLog  ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Thanks again