[BUG] Domoticz not working properly
Describe the bug Domoticz (Homeautomation Software) is not working properly with zoraxy. Browsers console is reporting 404 errors for resource files (images, js, css) even though they load if opened separate in browser window.
Screenshots
Host Environment:
- Arch: zoraxy_linux_amd64
- OS: ubuntu
- Version 3.1.4 and 3.1.5
Additional context Same applies to octoprint.
Can you screenshot your HTTP Proxy & Vdir rules here? I guess this might be related to a misconfiguration.
I don't have special rules or vdir-settings.
Ok, here are a few things you can try.
- According to their wiki, it seems you will need to use HTTP instead of HTTPS for reverse proxying.
- I am seeing their example uses a virtual directory endpoint
/domoticzinstead of/for reverse proxy. I am not sure if that is intentially done because their app actually rooted at/domoticz. If that is the case, you will need to add/domoticzto your upstream endpoint as well so Zoraxy will do the rewrite for you. i.e.192.168.11.100:443/domoticz(or192.168.11.100:80/domoticz) - Seeing that you set this as 3x weight, I assume you have other load balanced upstream? If yes, can you try narrow it down to a single upstream and see if this is a problem with the load balancer?
Thanks for your help. I have done a lot of things to make domoticz working with zoraxy already. I want to switch from npm where everything is working as expected.
Having it running though http makes no difference and the path is just their example. In my setup it is working on the root path ("/").
The weight is just a result of my trials. If you have only one upstream and you click on "increase weight" you can't decrease it :-) That's why there is a 3.
What I don't really understand is that if I load domoticz through zoraxy, I'll get all those 404 errors. But if I click on one of the 404-urls they load like they should. If I manually load all 404 links manually I get everything working after a while because the files are loaded into the browsers cache. But on different browsers it is not working.
Here it is loading through the frontend of domoticz:
Here is a manual load of the same url which was a 404 before:
@joschaschultze Just to be sure, you are not using Cloudflare right?
But if I click on one of the 404-urls they load like they should
This happens to me a few times when I forgot to turn on the Cloudflare developer mode.
I use cloudflare just for the certificate and DNS to my local ip address.
Hmm that is strange, as if you can directly access those resources, then it means it is correctly proxied. It defintely feel like a caching problem to me, but currently Zoraxy do not support cache, so it must be something else.
Can you send me the link of your testing site via email ([email protected])? I will see if I can reproduce it on my side.
I'm sorry, but my entire setup is only accessible locally or via my VPN. This means that unfortunately I cannot give you access to test by yourself.
Well ok, I will see if I got time to try out octoprint later, but for now there is nothing I can help. In the mean time, if you discover anything new, please feel free to let me know.
I have exactly the same issue here. Domoticz is not working correctly. I have always had a self managed Apache2 reverse proxy but I am now trying to turn everything over to Zoraxy because of it's simplicity, which I think is just amazing, but sadly Domoticz won't work wel. maybe one of the 30 refreshes of the page it loads to a kinda working state. It seems the connection gets closed to soon without a good reason. Although it goes wrong at a different moment every reload I have still added a dev tools console output:
As soon as I stop Zoraxy and start my self configured Apache2 proxy all works perfectly again! I do not have ratelimiting configured and tried almost every setting I could find.
@xvisor16 I guess it would be better for you to open a issue on Domoticz side and ask their devs their opinion. I am guessing they are relying on some sort of legacy behavior in apache2 to make it works. Meanwhile Zoraxy uses latest golang library for net/http serving, so there might be compatibility issue somewhere in between.