Page 1 of 1

Proxying UMS using nginx

Posted: Sun Nov 19, 2023 11:03 am
by gr0x0rd
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

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"
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

Re: Proxying UMS using nginx

Posted: Sun Nov 19, 2023 6:38 pm
by mik_s
Sorry but I don't think I can be much help with this.

UMS is mainly for serving the local network. However people have used similar setups to access it from the outside, but its not something I can give support on.
I know very little about networking but at the very least I know you need to make sure the ports are forwarded correctly.

A lot of changes has happened under the hood of UMS to do with networking so maybe this has broke your setup. Mostly from v11 on.

Someone was using proxypass to do something similar not that long ago. Maybe something here will give you a clue to where the problem is.

Re: Proxying UMS using nginx

Posted: Sun Nov 26, 2023 12:53 pm
by gr0x0rd
Thanks @mik_s I appreciate you reviewing my post.

I did go over the thread you linked, which lead me to attempting to set the headers in nginx, to equate the proxypassreverse directive in apache.

Should I find a solution, I will post it here.

Cheers,
~g