[GH-ISSUE #187] help with costum path #164

Closed
opened 2026-02-26 06:31:04 +03:00 by kerem · 1 comment
Owner

Originally created by @spcqike on GitHub (Aug 15, 2019).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/187

Hello,

I have a problem with costum paths.
I would like to add a costum path to a domain, but cant figure out how to do it.
Unfortunately, I can't use a sub-domain, which would work fine (at least with a .local domain). I have to use my Domain.TLD and want to resolve another service via the path.

I edited the proxy host for my Domain.TLD, created a custom location with path "/chat/" and IP and port of the desired service (10.8.101.8 17843).
So far, so good. The login page is loading just fine.

But when I want to log in, I get a debug page from the service that listens to the Domain.TLD.
the credentials are not correctly passed on to the second service.

the generated .conf looks like

`server {
set $forward_scheme http;
set $server "192.168.8.184";
set $port 9080;

listen 80;

server_name domain.tld;

access_log /data/logs/proxy_host-1.log proxy;

location /chat/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://10.8.101.8:17843/;

}

location / {
# Proxy!
include conf.d/include/proxy.conf;
}

Custom

include /data/nginx/custom/server_proxy[.]conf;
}
`

the second service consists of an index.php (ip:port/index.php) and forwards to a folder (ip:port/ipc/). I thought that the proxy would resolve something like domain.tld/chat/ipc/, but it's not working :(

is there anything i can do other than use a subdomain?

Originally created by @spcqike on GitHub (Aug 15, 2019). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/187 Hello, I have a problem with costum paths. I would like to add a costum path to a domain, but cant figure out how to do it. Unfortunately, I can't use a sub-domain, which would work fine (at least with a .local domain). I have to use my Domain.TLD and want to resolve another service via the path. I edited the proxy host for my Domain.TLD, created a custom location with path "/chat/" and IP and port of the desired service (10.8.101.8 17843). So far, so good. The login page is loading just fine. But when I want to log in, I get a debug page from the service that listens to the Domain.TLD. the credentials are not correctly passed on to the second service. the generated .conf looks like `server { set $forward_scheme http; set $server "192.168.8.184"; set $port 9080; listen 80; server_name domain.tld; access_log /data/logs/proxy_host-1.log proxy; location /chat/ { proxy_set_header Host $host; proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://10.8.101.8:17843/; } location / { # Proxy! include conf.d/include/proxy.conf; } # Custom include /data/nginx/custom/server_proxy[.]conf; } ` the second service consists of an index.php (ip:port/index.php) and forwards to a folder (ip:port/ipc/). I thought that the proxy would resolve something like domain.tld/chat/ipc/, but it's not working :( is there anything i can do other than use a subdomain?
kerem closed this issue 2026-02-26 06:31:04 +03:00
Author
Owner

@chaptergy commented on GitHub (May 11, 2021):

Unfortunately this is very likely an issue with whatever application you serve. Root-relative links within this application will be broken, since the html files won't actually be changed. So I don't think there is a different option than to use a subdomain, or editing all the files your application uses yourself.

<!-- gh-comment-id:838785807 --> @chaptergy commented on GitHub (May 11, 2021): Unfortunately this is very likely an issue with whatever application you serve. Root-relative links within this application will be broken, since the html files won't actually be changed. So I don't think there is a different option than to use a subdomain, or editing all the files your application uses yourself.
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#164
No description provided.