nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Adding a Custom Location takes the Site offline

Open pwfraley opened this issue 3 years ago • 21 comments

Are you in the right place?

  • Yes

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image? Yes
  • Are you sure you're not using someone else's docker image? Yes
  • If having problems with Lets Encrypt, have you made absolutely sure your site is accessible from outside of your network? Yes

Describe the bug

  • I have a very simple Site setup, which proxies to a quasar app (Works). The only thing I have enabled (though I tried all settings) is to force ssl
  • Now everything works fine. I can reach my site under the domain name. SSL is enabled, http requests get redirected to https
  • Now I edit the Proxy Host and add a custom location /api
  • Upon Saving my changes the site is taken offline

To Reproduce Steps to reproduce the behavior:

  1. Create a Simple Proxy Host with SSL (Lets Encrypt Enabled)
  2. After Certificate is setup make sure the site is reachable
  3. Now Edit the proxy host and add a simple Custom location (/api)
  4. Site is taken offline

Expected behavior The Site stays online and is reachable. The /api Url is also reachable

Operating System

  • Current Debian as Docker host

Additional context Basically I am trying to host a modern SPA Website. The Frontend is created using quasar/vue 3 and the Backend, which is a simple rest api is done using Dotnet Core C#. I want to host the quasar App under / and the api under /api.

pwfraley avatar Mar 07 '21 11:03 pwfraley

Your custom location basically broke the nginx config somehow. Take a look at the config itself for your proxy host and try to understand, why its malformed. Maybe you can find some helping infos in the logs.

l4rm4nd avatar Mar 26 '21 18:03 l4rm4nd

I figuered it out. When I first added the proxy host I had a typo in the backend service. Fixing the typo did not fix it in the config. I had to delete the entire proxy host and then recreate it. Then all worked fine.

pwfraley avatar Apr 06 '21 09:04 pwfraley

There's still something not right here, I have the same issue...

When a custom location is added there is no conf file generated and the proxy host shows as offline.

I was able to work around it by ignoring the gui and adding the extra location into the advances box on the proxy site tab.

image

dscpt avatar Feb 03 '24 18:02 dscpt

Hi.
I have the same issue and solved it like @dscpt did.

When I add any Custom Location with the GUI-Dialog the site goes offline.
After deletion of all Custom Locations, the Site is Online again.

I copied 3 n.conf from an older backup into the .../proxy-host Folder,
and only two of them were applied, and when the Site is offline, the one file got deleted by nginx.
After that, I removed the whole Site and created a new Site. The Filename was one higher, then the highest filename.
It also didn't work with the Custom Location, so I deleted it and recreated it manually. The File number is now 6.conf, but the old file 2.conf is still in the Folder, but it is not listed in the UI.

thx for the read and the workaround and greetings from Hamburg, Germany

JaroslavMitrovic avatar Feb 06 '24 21:02 JaroslavMitrovic

After I got a new installation of NPM I started having this issue as well. Are there any workarounds that don't require messing around with the configuration files?

MeesJ avatar Feb 08 '24 14:02 MeesJ

I have the same issue.

b1nary-b0b avatar Feb 08 '24 21:02 b1nary-b0b

This problem can only be said to have arisen again!

ghost avatar Feb 09 '24 10:02 ghost

Same issue here too... This used to work and it's not working in the latest version.

jricardooliveira avatar Feb 09 '24 11:02 jricardooliveira

Same issue around here, I need to add /swagger to my site. When I create an extra host for swagger, it works so it isn't on my backend.

Here's the conf: image

alessiodam avatar Feb 12 '24 14:02 alessiodam

See if https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3512#issuecomment-1940868886 works for you?

AkshayRao27 avatar Feb 13 '24 09:02 AkshayRao27

I have the same problem with "custom location". I am using NPM in docker. This trick (https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3512#issuecomment-1940868886) solves the problem - at least for now. 10x.

hans-holgersson avatar Feb 13 '24 19:02 hans-holgersson

I'm having the same problem here, workaround overwriting the gui using raw text solved the problem, on container logs I've seen erros of trying to delete files on directory.

Its so impressive sometimes a pull request that doest change anything can stop working something that never was a problem before...

washingtonsousa avatar Feb 16 '24 04:02 washingtonsousa

Same error. It looks like it was introduced on the last update? Is there a real solution for this?

pageagency avatar Feb 16 '24 23:02 pageagency

Till there's an update and a real fix, https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3512#issuecomment-1940868886 seems to be a workaround that's fixing it for several people.

AkshayRao27 avatar Feb 17 '24 07:02 AkshayRao27