NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.08k stars 2.68k forks source link

Adding a Custom Location takes the Site offline #929

Open pwfraley opened 3 years ago

pwfraley commented 3 years ago

Are you in the right place?

Checklist

Describe the bug

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

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.

l4rm4nd commented 3 years ago

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.

pwfraley commented 3 years ago

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.

dscpt commented 9 months ago

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

JaroslavMitrovic commented 9 months ago

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

MeesJ commented 9 months ago

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?

b1nary-b0b commented 9 months ago

I have the same issue.

ghost commented 9 months ago

This problem can only be said to have arisen again!

jricardooliveira commented 9 months ago

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

alessiodam commented 9 months ago

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

AkshayRao27 commented 9 months ago

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

hans-holgersson commented 9 months ago

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.

washingtonsousa commented 9 months ago

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

pageagency commented 9 months ago

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

AkshayRao27 commented 9 months ago

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.

github-actions[bot] commented 2 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1:

hans-holgersson commented 2 months ago

hi ... has anyone had a chance to work on this issue?

alessiodam commented 2 months ago

It's a user issue. If you make it correctly, it won't take it offline.

hans-holgersson commented 2 months ago

It's a user issue. If you make it correctly, it won't take it offline.

probably you are right. In this case tell me please where is the the error, which causes the troubles in the folowing setup:

image

hans-holgersson commented 2 months ago

So, to be clear ...

I want to instantiate a location in order to address https://www.site.com/personal to be served from the root of the webservice runnig on host 192.168.0.1 on tcp port 81.

This is what i am trying to implement, but when i save the config the site goes offline.

How could i do this to work?

pageagency commented 2 months ago

I don't know about personal but I've had the same issue with /admin and gave up.

hans-holgersson commented 2 months ago

I don't know about personal but I've had the same issue with /admin and gave up.

That "personal" is the name of the location. It coul be "admin", or "login", or anything else...