I would like to install OH and CometVisu separately. By this I mean: in OH just add the CometVisu backend for protocol support, but not the PHP AddOn.
Then I’d like to install another webserver like lighttpd or apache - either on the same machine as OH or on a different machine - and install CometVisu, which should talk to OH.
Is this possible? What requirements must be met, which configuration has to be done?
Or is this a bad idea? Then why?
My setup: Ubuntu 16.04, OH 2.2 via apt-get…any other information needed?
I’ve searched through posts here, but found just one thread which didn’t continue in this direction.
Great thanx in advance for your answers!
I always thought that you have to install comet visu separately anyway.
What I meant: don‘t use OH‘s Webserver, but use e.g. Apache - just for cometvisu.
Whatever: I have opened another thread because of problems with cometvisu backend. Without solving this, I can’t use cometvisu anyway
Basically this is a good idea, because the build-in PHP support has been a source of trouble from time to time.
Basically there are two things you need to handle:
- Reverse-Proxy the communication between CometVisu and openHAB
Example config settings for apache2:
Header set X-CometVisu-Backend-LoginUrl "http://<your-openhab-server-ip>:8080/rest/cv/l"
Header set X-CometVisu-Backend-Name "openhab2"
# Openhab2 backend proxy
ProxyPass /rest/cv http://<your-openhab-server-ip>:8080/rest/cv
ProxyPassReverse http://<your-openhab-server-ip>:8080/rest/cv /rest/cv
- It is recommended to use PHP5, a current version of PHP may have compability Problems with the CometVisu PHP scripts.