diff --git a/src/nginxconfig.ejs b/src/nginxconfig.ejs index 8afd78c5a..861e130df 100644 --- a/src/nginxconfig.ejs +++ b/src/nginxconfig.ejs @@ -268,6 +268,17 @@ server { proxy_pass http://<%= ip %>:<%= port %>; } + + <% if (proxyAuth.location !== '/') { %> + location / { + proxy_pass http://<%= ip %>:<%= port %>; + } + <% } %> + + <% } else { %> + location / { + proxy_pass http://<%= ip %>:<%= port %>; + } <% } %> <% Object.keys(httpPaths).forEach(function (path) { -%> @@ -277,9 +288,6 @@ server { } <% }); %> - location / { - proxy_pass http://<%= ip %>:<%= port %>; - } <% } else if ( endpoint === 'redirect' ) { %> # redirect everything to the app. this is temporary because there is no way # to clear a permanent redirect on the browser