Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a Custom Location takes the Site offline #929

Open
pwfraley opened this issue Mar 7, 2021 · 21 comments
Open

Adding a Custom Location takes the Site offline #929

pwfraley opened this issue Mar 7, 2021 · 21 comments
Labels

Comments

@pwfraley
Copy link

pwfraley commented Mar 7, 2021

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 pwfraley added the bug label Mar 7, 2021
@l4rm4nd
Copy link

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

@pwfraley
Copy link
Author

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

@dscpt
Copy link

dscpt commented 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

@JaroslavMitrovic
Copy link

JaroslavMitrovic commented 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

@MeesJ
Copy link

MeesJ commented 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?

@b1nary-b0b
Copy link

I have the same issue.

@ghost
Copy link

ghost commented Feb 9, 2024

This problem can only be said to have arisen again!

@jricardooliveira
Copy link

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

@alessiodam
Copy link

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
Copy link

See if #3512 (comment) works for you?

@hans-holgersson
Copy link

I have the same problem with "custom location".
I am using NPM in docker.
This trick (#3512 (comment)) solves the problem - at least for now.
10x.

@washingtonsousa
Copy link

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
Copy link

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

@AkshayRao27
Copy link

Till there's an update and a real fix, #3512 (comment) seems to be a workaround that's fixing it for several people.

Copy link

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

@github-actions github-actions bot added the stale label Aug 24, 2024
@hans-holgersson
Copy link

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

@alessiodam
Copy link

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

@hans-holgersson
Copy link

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
Copy link

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
Copy link

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

@hans-holgersson
Copy link

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

@github-actions github-actions bot removed the stale label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests