[GH-ISSUE #929] Adding a Custom Location takes the Site offline #789

Open
opened 2026-02-26 06:34:25 +03:00 by kerem · 25 comments
Owner

Originally created by @pwfraley on GitHub (Mar 7, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/929

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.

Originally created by @pwfraley on GitHub (Mar 7, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/929 **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.
Author
Owner

@l4rm4nd commented on GitHub (Mar 26, 2021):

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.

<!-- gh-comment-id:808428053 --> @l4rm4nd commented on GitHub (Mar 26, 2021): 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.
Author
Owner

@pwfraley commented on GitHub (Apr 6, 2021):

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.

<!-- gh-comment-id:813976770 --> @pwfraley commented on GitHub (Apr 6, 2021): 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.
Author
Owner

@dscpt commented on GitHub (Feb 3, 2024):

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

<!-- gh-comment-id:1925421823 --> @dscpt commented on GitHub (Feb 3, 2024): 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](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/87764256/bae492eb-0d14-41f5-809f-b443b85c9bf4)
Author
Owner

@JaroslavMitrovic commented on GitHub (Feb 6, 2024):

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

<!-- gh-comment-id:1930803710 --> @JaroslavMitrovic commented on GitHub (Feb 6, 2024): 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
Author
Owner

@MeesJ commented on GitHub (Feb 8, 2024):

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?

<!-- gh-comment-id:1934200562 --> @MeesJ commented on GitHub (Feb 8, 2024): 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?
Author
Owner

@b1nary-b0b commented on GitHub (Feb 8, 2024):

I have the same issue.

<!-- gh-comment-id:1934999946 --> @b1nary-b0b commented on GitHub (Feb 8, 2024): I have the same issue.
Author
Owner

@ghost commented on GitHub (Feb 9, 2024):

This problem can only be said to have arisen again!

<!-- gh-comment-id:1935710399 --> @ghost commented on GitHub (Feb 9, 2024): This problem can only be said to have arisen again!
Author
Owner

@jricardooliveira commented on GitHub (Feb 9, 2024):

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

<!-- gh-comment-id:1935778381 --> @jricardooliveira commented on GitHub (Feb 9, 2024): Same issue here too... This used to work and it's not working in the latest version.
Author
Owner

@alessiodam commented on GitHub (Feb 12, 2024):

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

<!-- gh-comment-id:1938813918 --> @alessiodam commented on GitHub (Feb 12, 2024): 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](https://github.com/NginxProxyManager/nginx-proxy-manager/assets/69647028/98bdd86c-5c72-4b7f-b99f-3ad797dd98b9)
Author
Owner

@AkshayRao27 commented on GitHub (Feb 13, 2024):

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

<!-- gh-comment-id:1940877438 --> @AkshayRao27 commented on GitHub (Feb 13, 2024): See if https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3512#issuecomment-1940868886 works for you?
Author
Owner

@hans-holgersson commented on GitHub (Feb 13, 2024):

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.

<!-- gh-comment-id:1942291015 --> @hans-holgersson commented on GitHub (Feb 13, 2024): 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.
Author
Owner

@washingtonsousa commented on GitHub (Feb 16, 2024):

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

<!-- gh-comment-id:1947722787 --> @washingtonsousa commented on GitHub (Feb 16, 2024): 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...
Author
Owner

@pageagency commented on GitHub (Feb 16, 2024):

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

<!-- gh-comment-id:1949491291 --> @pageagency commented on GitHub (Feb 16, 2024): Same error. It looks like it was introduced on the last update? Is there a real solution for this?
Author
Owner

@AkshayRao27 commented on GitHub (Feb 17, 2024):

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.

<!-- gh-comment-id:1949889160 --> @AkshayRao27 commented on GitHub (Feb 17, 2024): 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.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 24, 2024):

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

<!-- gh-comment-id:2307988526 --> @github-actions[bot] commented on GitHub (Aug 24, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@hans-holgersson commented on GitHub (Aug 24, 2024):

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

<!-- gh-comment-id:2308265348 --> @hans-holgersson commented on GitHub (Aug 24, 2024): hi ... has anyone had a chance to work on this issue?
Author
Owner

@alessiodam commented on GitHub (Aug 28, 2024):

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

<!-- gh-comment-id:2314550272 --> @alessiodam commented on GitHub (Aug 28, 2024): It's a user issue. If you make it correctly, it won't take it offline.
Author
Owner

@hans-holgersson commented on GitHub (Aug 30, 2024):

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

<!-- gh-comment-id:2320315938 --> @hans-holgersson commented on GitHub (Aug 30, 2024): > 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](https://github.com/user-attachments/assets/29d22aea-b341-470b-bbbb-3f7a2a9f3736)
Author
Owner

@hans-holgersson commented on GitHub (Aug 30, 2024):

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?

<!-- gh-comment-id:2320334879 --> @hans-holgersson commented on GitHub (Aug 30, 2024): 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?
Author
Owner

@pageagency commented on GitHub (Aug 30, 2024):

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

<!-- gh-comment-id:2320523234 --> @pageagency commented on GitHub (Aug 30, 2024): I don't know about personal but I've had the same issue with /admin and gave up.
Author
Owner

@hans-holgersson commented on GitHub (Aug 30, 2024):

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

<!-- gh-comment-id:2320632074 --> @hans-holgersson commented on GitHub (Aug 30, 2024): > 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...
Author
Owner

@github-actions[bot] commented on GitHub (Apr 28, 2025):

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

<!-- gh-comment-id:2833817947 --> @github-actions[bot] commented on GitHub (Apr 28, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@alessiodam commented on GitHub (Apr 28, 2025):

I gave up too. Just switch to NGINX config files to be honest.

<!-- gh-comment-id:2834269790 --> @alessiodam commented on GitHub (Apr 28, 2025): I gave up too. Just switch to NGINX config files to be honest.
Author
Owner

@hans-holgersson commented on GitHub (Apr 29, 2025):

i will give it a try with the latest npm ...

<!-- gh-comment-id:2840308579 --> @hans-holgersson commented on GitHub (Apr 29, 2025): i will give it a try with the latest npm ...
Author
Owner

@github-actions[bot] commented on GitHub (Jan 1, 2026):

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

<!-- gh-comment-id:3703176214 --> @github-actions[bot] commented on GitHub (Jan 1, 2026): Issue is now considered stale. If you want to keep it open, please comment :+1:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#789
No description provided.