PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

Configure domoticz webroot #174

Closed Zenuka closed 1 year ago

Zenuka commented 5 years ago

I've changed the webroot for domoticz (into /domoticz) to use it behind a reverse proxy. How should I configure the plugin? Is there a way to specify the webroot? I've searched the readme's and issues but could not find anything related to this. I'm sorry if I'm missing something obvious 😊

boscorelly commented 4 years ago

Why do you rewrite url with your reverse proxy ?! Simply base the redirection depending on the virtual host name...

PatchworkBoy commented 4 years ago

Have you tried the following in config.json...?

"server":"user:pass@127.0.0.1/domoticz"

skulblaka24 commented 3 years ago

Hi there,

As there isn't any answer, I will 😉

I've tried what you suggested and it does not work...

The reason is because when you are building your request url in the code, Here for example: 114 this.apiBaseURL = "http" + (this.ssl ? "s" : "") + "://" + this.server + ":" + this.port + "/json.htm?";

you add the port variable at the end of the line. With a webroot parameter the port should be in-between. eg: Current not working url: https://URL/WEBROOT:443/json.htm? Should be: https://URL:443/WEBROOT/json.htm?

Hopes this clarify 😉

skulblaka24 commented 3 years ago

Hi again,

I've created a pull request with the added code to handle the webroot parameter. If someone is still interested.

Have a great one !

PatchworkBoy commented 1 year ago

Merged in and pushed a few revisions back...