Proxying UMS using nginx
Posted: Sun Nov 19, 2023 11:03 am
Hi all,
I've used UMS for a number of years, and it's been great for me. I have used both apache and nginx as a reverse proxy in order to enjoy my local content elsewhere. Being able to enable basic authentication was helpful as well, until that was added to UMS Web UI a while back.
Some time ago, an update to either UMS or nginx- not sure which- prevented proxied content from transcoding properly. Loading up the same media in a browser locally on the default port works as expected, but attempting over the reverse proxied connection errors out with the error "The media could not be loaded, either because the server or network failed or because the format is not supported."
Within the nginx error log, I note
Digging into this, I couldn't find any examples on this board of others using nginx to proxy UMS. I did find a few examples using apache, and tried setting headers to equate the proxypassreverse directive that doesn't exist in nginx, but to no effect.
Researching the specific nginx error about the headers at the same time led me to try setting chunked_transfer_encoding off but that had no effect either.
Open to any advice or suggestions on this issue, it would great to have my UMS content working externally once again.
Cheers,
~g
I've used UMS for a number of years, and it's been great for me. I have used both apache and nginx as a reverse proxy in order to enjoy my local content elsewhere. Being able to enable basic authentication was helpful as well, until that was added to UMS Web UI a while back.
Some time ago, an update to either UMS or nginx- not sure which- prevented proxied content from transcoding properly. Loading up the same media in a browser locally on the default port works as expected, but attempting over the reverse proxied connection errors out with the error "The media could not be loaded, either because the server or network failed or because the format is not supported."
Within the nginx error log, I note
Code: Select all
"[error] 253897#253897: *1 upstream sent "Content-Length" and "Transfer-Encoding" headers at the same time while reading response header from upstream, client: <redacted>, server: <redacted>, request: "GET /v1/api/player/media/dcaa5b9e-f321-4b5f-b2e3-7589b8ac6e71/1723 HTTP/2.0", upstream: "http://127.0.0.1:9001/v1/api/player/media/dcaa5b9e-f321-4b5f-b2e3-7589b8ac6e71/1723", host: "<redacted>", referrer: "https://<redacted>/player/play/1723"
Researching the specific nginx error about the headers at the same time led me to try setting chunked_transfer_encoding off but that had no effect either.
Open to any advice or suggestions on this issue, it would great to have my UMS content working externally once again.
Cheers,
~g