Since I use Nginx already to access Domoticz (because I want HTTPS access, which was not available until recently in native Domotic) I decided to use it as a front-end for the OTGW web server as well.
I proxy the location '/otgw/' to the local port on which OTGW is listening, like so:
Code: Select all
location /otgw/ {
proxy_pass http://localhost:8081/;
proxy_redirect default;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Would it be possible to either replace the absolute URLs with relative URLs, or to replace them with the complete URL (i.e. including host name) so that there's a pattern in the URL that I can rewrite with Nginx directives?
Edit: should have been posted in OTGW subforum - sorry.