mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #2594] Issue - serve a host as subpage from another host [ Two servers in single host ] #1807
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#1807
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 @redtripleAAA on GitHub (Feb 7, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2594
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
Issue - server a host as subpage from another host
Nginx Proxy Manager Version
v2.9.19
To Reproduce
Steps to reproduce the behavior:
You have two servers:
SERVER ONE >> https://serverone.com
SERVER TWO >> http://10.0.12.201:8134
SERVER ONE works fine, and I have a host record working from npm.
Now, I want to serve the SERVER TWO as part of SERVER ONE, for example, when I type URL
https://serverone.com/servertwo
Any idea what would be the issue here?
Reason doing this setup:
To server both servers in a single domain, that helps avoid CORS issues as well.
Expected behavior
To load server two into the subpage from server one as mentioned above
Screenshots
Note: I tried to use Locations setup from SERVER ONE, and point a subpage as location SERVER TWO.
However, it seems npm recognizes the input, still it shows error 404 Not Found
Operating System
Docker npm
Synolog DSM
Additional context
@cproensa commented on GitHub (Feb 25, 2023):
Try forwarding the location to
10.100.12.201/(notice the slash at the end)Also, seems that location must be
/servertwo/, (also ending with slash), otherwise the subsequent pages will result in, eg: serverone.com/servertwoindex.html instead of serverone.com/servertwo/index.htmlThis may be a bug in itself
Still, even if it initially works, im having problems with some services messing with the url... but i dont know whose fault is at this point.
@redtripleAAA commented on GitHub (Feb 26, 2023):
@cproensa thanks for the response here!
I think your workaround/trick works! what is strange that sometimes I get the 404, and sometimes gets the good 200 response after that slash.
Similar to your issues, sometimes it messes with the url.
Strange issue, and I wish this issue gets addressed to be considered in v3 of npm.
@cproensa commented on GitHub (Mar 18, 2023):
The issues may happen with each app/website
If the target app has a configuration for an absolute path in its url, the proxyed access may not work.
For example:
The app expects to be running on
http://realhost/, but the proxyed request is tohttp://proxyhost/myapp/This app will redirect to
http://proxyhost/login.html, and that won't work, because is outside of the proxyed location. The correct redirect should be tohttp://proxyhost/myapp/login.htmlIn this case, you need to configure the app to be served in the same path as the proxy location, in this example:
http://realhost/myapp/Other apps are "smart" and will derive the working url from the client headers, and will work without modification, under any relative path.
@github-actions[bot] commented on GitHub (Jan 28, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Mar 14, 2025):
Issue was closed due to inactivity.