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

Custom location error

Open casperse opened this issue 3 years ago • 13 comments

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 at the bottom it says: v2.9.9 © 2021 jc21.com. Theme by Tabler :-)
  • Have you searched for similar issues (both open and closed)?

    • Yes & No - a subdir should work by using the "Custom location" but in my case it doesn't?

Describe the bug I have moved away from SWAG to nginx-proxy-manager-official docker

Adding my subdomian youtube.domain.com and I get the cert. (That part works!)

  1. http://192.168.0.6:8282/youtube-dl - works (Docker: https://github.com/manbearwiz/youtube-dl-server)
  2. Adding it to nginx-proxy-manager-official docker image image

I have also tried using: (/youtube-dl/)?/socket

And I also tried adding two locations: /socket /youtube-dl/socket

They all just give the same error when I try to go to: https://youtube.domain.com I keep getting the error webpage image

But I can see it working if I add the custom location after the domain: adding "/youtube-dl" after the http with cert it works? https://youtube.domain.com/youtube-dl image

Shouldnt nginx-proxy-manager not add the /youtube-dl to the domain path?

Nginx Proxy Manager Version v2.9.9 © 2021 jc21.com. Theme by Tabler

casperse avatar Oct 05 '21 16:10 casperse

Locations in nginx are tricky! It could be that you are simply missing a trailing slash on your location.

chaptergy avatar Oct 05 '21 19:10 chaptergy

I have tried many combination of adding a slash :-) (/youtube-dl/)?/socket/ /socket/ /youtube-dl/socket/ /youtube-dl/

casperse avatar Oct 06 '21 06:10 casperse

If I understood correctly, you are trying to proxy domain.com/example to 192.168.0.6:8282/youtube-dl/example, right? In this case, you could try to set the location to / and the forward name to 192.168.0.6/youtube-dl. ~If you want to force https redirect, you might have to add include conf.d/include/force-ssl.conf; to the custom config using the button with the wheel icon, since the automatic redirect is overwritten otherwise.~ This seems to be outdated :)

p-fruck avatar Oct 24 '21 19:10 p-fruck

I appear to have a similar issue.

I have 3 hosts that use custom locations.

2 of them experienced the issues mentioned above and it doesn't append the location at the end when navigating. Its as if the field in NPM is still blank - even though it isn't.

after countless times of typing it in and different conbinations of pressing enter and tabbing to the next field and then pressing save, it eventually recognises that there is something entered into the location field in custom locations and then when navigating in a browser to the path, it appends the location at the end of the URL and works.

I have so far got 2 of the 3 hosts working but it really shouldn't be like this

UPDATE: tried a reboot of the server and stack and now the 2 that were working are now not. The location is no longer being appended despite nothing changing. If I manually add the location at the end, the host works as intended. Just doesn't do it automatically.

UPDATE2: updated the stack and we are back to the 2 out of the 3 working again.

image

I am going to https://subdomain.domain.co.uk and i am wanting it to output as if I had entered https://subdomain.domain.co.uk/admin (SSL certs and DNS records are in place correctly)

if i enter the url manually it works, just doesn't re-direct automatically - am i doing something wrong? - it works for the other hosts - just not this one.

Xanderlicious avatar Jul 31 '22 19:07 Xanderlicious

I have similar issue with the locations: I add proxy domain to myhost.com I add location /api and point it to one of the hosts in my network host-01.lan

When I try to navigate to http://myhost.com/api/health I expect that my app will get a request with path /health, but it's getting a request with full /api/health path which is unexpected. My endpoint is at /health url so the app shouldn't know about the sub location part.

Can this configuration be achieved?

MichaelSL avatar Jan 13 '23 21:01 MichaelSL

Seeing the same issue!

mike12806 avatar Jan 18 '23 01:01 mike12806

Same issue here.

Proxy Host: ProxyHost

Its Custom Location: CustomLocation

Proxy Host: https://projects.myDomain.tld <- Works as expected Custom Location: https://projects.myDomain.tld/projectName <- Results in Cannot GET /projectName/

idoodler avatar Apr 24 '23 11:04 idoodler

The solution for me was to add a trailing slash in Forward Hostname / IP. So, instead of 172.17.0.1 for the IP, you'd put 172.17.0.1/

alax avatar May 02 '23 23:05 alax

The solution for me was to add a trailing slash in Forward Hostname / IP. So, instead of 172.17.0.1 for the IP, you'd put 172.17.0.1/

Thats it, thanks!

idoodler avatar May 05 '23 09:05 idoodler

@alax I love you man, saved my day

yakovlevkll avatar Aug 15 '23 17:08 yakovlevkll

image image seems im having issues with google chrome redirecting properly image

works on firefox and thorium image

regchanuk avatar Dec 08 '23 15:12 regchanuk

details page i have it forwarded to 192.168.50.201/

custom location location /bb fw host name as following 192.168.50.201/bb forward 443

regchanuk avatar Dec 08 '23 15:12 regchanuk

Nginx don't seem to work with custom locations. I wanted /api/ to go to a ip. But I notice nginx also won't use the docker container name as a IP like I've seen its suppose to work. Is there a old version. Of nginx proxy manager where custom locations work? It just says offline. I had one setup before and it worked then after a reboot it just stopped for no reason. It used to work but I think the newer version has bugs.

blade10101 avatar Feb 17 '24 13:02 blade10101