I currently have nginx serving as a reverse proxy on my router with a single server block and multiple locations mapping to specific ports on my NAS. Everything seems to be working fine except for one item -- Synology DSM. Right now, the only way that I have WAN access to DSM in my setup is with the following configuration:
location / {
proxy_pass http://127.0.0.1:5000;
}
I'd prefer to have something like this:
location /dsm {
proxy_pass http://127.0.0.1:5000;
}
However, I can't seem to get this to work. I've tried location and proxy_pass with/without ending slashes and attempted different rewrite options but nothing has worked. I either get "page not found" errors or the page loads and I can view the source but nothing is displayed.
It should be noted that the DSM is CGI-based (loads as http://127.0.0.1:5000/webman/index.cgi
) and it looks like there are absolute paths hardcoded in the css and js.