Php_support in Domoticz server?

Moderator: leecollings

Post Reply
juankar
Posts: 223
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Php_support in Domoticz server?

Post by juankar »

Hello
Is it planning the support for php in domoticz integrated web server?

Thanks
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Php_support in Domoticz server?

Post by Egregius »

To run scripts or to host pages?
Either install php5 and/or apache2/nginx.
juankar
Posts: 223
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: Php_support in Domoticz server?

Post 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
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Php_support in Domoticz server?

Post by Egregius »

You can easily do it by running on different port numbers.
juankar
Posts: 223
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: Php_support in Domoticz server?

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest