diff --git a/nginx-transcoder/nginx-no-ssl.conf b/nginx-transcoder/nginx-no-ssl.conf index 4941ca0..04cf802 100644 --- a/nginx-transcoder/nginx-no-ssl.conf +++ b/nginx-transcoder/nginx-no-ssl.conf @@ -39,6 +39,13 @@ http { limit_req_status 401; server { + # Emit RELATIVE redirects. Otherwise nginx rebuilds a directory redirect + # (e.g. /webtools -> /webtools/) from its internal listen port, dropping + # any external mapped port when the container is published on a different + # port (docker -p 8081:80, or behind a reverse proxy / VPN bind) and + # sending the browser to the wrong URL. + absolute_redirect off; + listen ${HTTP_PORT}; location / { diff --git a/nginx-transcoder/nginx.conf b/nginx-transcoder/nginx.conf index be7d508..95116a4 100644 --- a/nginx-transcoder/nginx.conf +++ b/nginx-transcoder/nginx.conf @@ -44,6 +44,13 @@ http { limit_req_status 401; server { + # Emit RELATIVE redirects. Otherwise nginx rebuilds a directory redirect + # (e.g. /webtools -> /webtools/) from its internal listen port, dropping + # any external mapped port when the container is published on a different + # port (docker -p 8081:80, or behind a reverse proxy / VPN bind) and + # sending the browser to the wrong URL. + absolute_redirect off; + listen ${HTTP_PORT}; listen 443 ssl;