I setup nginx as a reverse proxy in a docker container to link to sites outside of the container. I have a vhost config setup as follows (I tried adding the ^~ before the location for home-assistant):
server { # simple reverse-proxy
listen 80;
location / {
proxy_pass http://192.168.1.99:6789;
}
location ^~ /home-assistant {
proxy_pass http://192.168.1.99:8123/;
}
location /calibre-web/ {
proxy_pass http://192.168.1.99:8181/;
}
}
For both home-assistant and calibre-web sites, the page loads, but I get 404 errors for all other items (images, CSS, etc...). If I try to click a link in the applications, it links me to 192.168.1.99/file and not 192.168.1.99/site-folder/file as it should. Below are a few records from the logs (note the one 200 response, and the other 404 responses). What am I doing wrong here? Thanks in advance for the help.
192.168.1.6 - randy [15/Aug/2016:03:15:42 +0000] "GET /frontend/panels/dev-template-0a099d4589636ed3038a3e9f020468a7.html HTTP/1.1" 404 199 "http://192.168.1.99/home-assistant/" "Mozilla/5.0 (X11; CrOS x86_64 8350.60.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.85 Safari/537.36"
192.168.1.6 - randy [15/Aug/2016:03:15:42 +0000] "GET /frontend/panels/logbook-66108d82763359a218c9695f0553de40.html HTTP/1.1" 404 199 "http://192.168.1.99/home-assistant/" "Mozilla/5.0 (X11; CrOS x86_64 8350.60.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.85 Safari/537.36"
192.168.1.6 - randy [15/Aug/2016:03:17:54 +0000] "GET /home-assistant/ HTTP/1.1" 200 1654 "-" "Mozilla/5.0 (X11; CrOS x86_64 8350.60.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.85 Safari/537.36"
192.168.1.6 - randy [15/Aug/2016:03:17:55 +0000] "GET /static/icons/favicon-192x192.png HTTP/1.1" 404 91 "http://192.168.1.99/home-assistant/" "Mozilla/5.0 (X11; CrOS x86_64 8350.60.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.85 Safari/537.36"
192.168.1.6 - randy [15/Aug/2016:03:17:55 +0000] "GET /static/core-457d5acd123e7dc38947c07984b3a5e8.js HTTP/1.1" 404 91 "http://192.168.1.99/home-assistant/" "Mozilla/5.0 (X11; CrOS x86_64 8350.60.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.85 Safari/537.36"
Here is a copy of my root nginx.conf. I'm guessing the error is in here somewhere, I just cant figure out where.