mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #1462] Custom location error #1130
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @casperse on GitHub (Oct 5, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1462
Checklist
Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker image?Are you sure you're not using someone else's docker image?
Have you searched for similar issues (both open and closed)?
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!)
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
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
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
@chaptergy commented on GitHub (Oct 5, 2021):
Locations in nginx are tricky! It could be that you are simply missing a trailing slash on your location.
@casperse commented on GitHub (Oct 6, 2021):
I have tried many combination of adding a slash :-)
(/youtube-dl/)?/socket/
/socket/
/youtube-dl/socket/
/youtube-dl/
@p-fruck commented on GitHub (Oct 24, 2021):
If I understood correctly, you are trying to proxy
domain.com/exampleto192.168.0.6:8282/youtube-dl/example, right? In this case, you could try to set the location to/and the forward name to192.168.0.6/youtube-dl.If you want to force https redirect, you might have to addThis seems to be outdated :)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.@Xanderlicious commented on GitHub (Jul 31, 2022):
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.
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.
@MichaelSL commented on GitHub (Jan 13, 2023):
I have similar issue with the locations:
I add proxy domain to
myhost.comI add location
/apiand point it to one of the hosts in my networkhost-01.lanWhen I try to navigate to
http://myhost.com/api/healthI expect that my app will get a request with path/health, but it's getting a request with full/api/healthpath which is unexpected. My endpoint is at/healthurl so the app shouldn't know about the sub location part.Can this configuration be achieved?
@mike12806 commented on GitHub (Jan 18, 2023):
Seeing the same issue!
@idoodler commented on GitHub (Apr 24, 2023):
Same issue here.
Proxy Host:

Its Custom Location:

Proxy Host: https://projects.myDomain.tld <- Works as expected
Custom Location: https://projects.myDomain.tld/projectName <- Results in
Cannot GET /projectName/@alax commented on GitHub (May 2, 2023):
The solution for me was to add a trailing slash in Forward Hostname / IP. So, instead of
172.17.0.1for the IP, you'd put172.17.0.1/@idoodler commented on GitHub (May 5, 2023):
Thats it, thanks!
@yakovlevkll commented on GitHub (Aug 15, 2023):
@alax I love you man, saved my day
@regchanuk commented on GitHub (Dec 8, 2023):
seems im having issues with google chrome redirecting properly
works on firefox and thorium

@regchanuk commented on GitHub (Dec 8, 2023):
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
@blade10101 commented on GitHub (Feb 17, 2024):
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.
@github-actions[bot] commented on GitHub (Oct 8, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Oct 14, 2025):
Issue was closed due to inactivity.