I have a small home server that I use to run various web apps using Docker. I would like to be able to access each of these services on a unique path. This works fine for simple things (like a small website) using nginx proxy_pass, however, when I try to setup something similar for a more complex application it doesn't work.

For example, I'm trying to run Home Assistant and would like to access it on [ip_address]/homeassistant/, so I configured nginx with variations of

location /homeassistant/ {
    proxy_pass http://homeassistant:8123/;

but either get 502 error or it simply fails as soon as it tries to open a new page (stops using the /homeassistant).

Is this behaviour impossible without manually configuring Home Assistant to use /homeassistant or am I simply doing something wrong?

  • The app should be written in a way that allows it to work in subpath. Usually that’s not the case, so I would recommend to use subdomains (homeassist.example.com) instead of paths – Alexey Ten May 25 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.