[GH-ISSUE #767] help needed with configuring #650

Closed
opened 2026-02-26 06:33:50 +03:00 by kerem · 6 comments
Owner

Originally created by @NightFalcon650 on GitHub (Dec 9, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/767

Good evening,

I've installed nginx proxy manager and i want to configure different services in the manner on the picture.
So connect through a url like xxx.duckdns.org
and connect to services with adding /service1 of /service2 etc.

nginx

Each service kan be on a different IP:port.
How can i get this to work and could someone show me how and where to configure this?

Originally created by @NightFalcon650 on GitHub (Dec 9, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/767 Good evening, I've installed nginx proxy manager and i want to configure different services in the manner on the picture. So connect through a url like xxx.duckdns.org and connect to services with adding /service1 of /service2 etc. ![nginx](https://user-images.githubusercontent.com/7109209/101683986-003cec80-3a66-11eb-9381-c26a2eb41ffc.png) Each service kan be on a different IP:port. How can i get this to work and could someone show me how and where to configure this?
kerem 2026-02-26 06:33:50 +03:00
Author
Owner

@spcqike commented on GitHub (Dec 10, 2020):

Hello

this should be possible. just create a proxy_host, give it your desired dns name, fill in some pseudo ip/name and port (this will be shown on the overview page!), create a location and give it all your needed infos.

in my case, i use "php7/tvm" and port 80, because its a docker network where nginx sees the other container via its name, but you should be able to use whatever you like. so a location with "/" and a DNS/IP/Path like "xxx.duckdns.org/service1" and Port "8081" should work. at least it did for me.
01
02

<!-- gh-comment-id:742280596 --> @spcqike commented on GitHub (Dec 10, 2020): Hello this should be possible. just create a proxy_host, give it your desired dns name, fill in some pseudo ip/name and port (this will be shown on the overview page!), create a location and give it all your needed infos. in my case, i use "php7/tvm" and port 80, because its a docker network where nginx sees the other container via its name, but you should be able to use whatever you like. so a location with "/" and a DNS/IP/Path like "xxx.duckdns.org/service1" and Port "8081" should work. at least it did for me. ![01](https://user-images.githubusercontent.com/50098985/101731483-fba32300-3abb-11eb-8b0d-edf4916a8456.png) ![02](https://user-images.githubusercontent.com/50098985/101731486-fcd45000-3abb-11eb-9e0a-6df623996967.png)
Author
Owner

@NightFalcon650 commented on GitHub (Dec 12, 2020):

Thanks for the reply. I've tryed it and it works partly.
I've to put the / behind the adresses and the location parts, otherwise it's giving the 404 error.

image

But with the location part, the site gets loaded, but at the moment that the site has to load it's files it gives 502 bad gateway errors.

I've tried it with service1
xxx.duckdns.org points to IP:PORT

image

xxx.duckdns.org/service1 point to the same IP but a other port IP:PORT.

image

The service1 expects to load it's stuff from IP:PORT/.... etc.
But the proxy points to xxx.duckdns.org/index.html

So the location file points to the right place, but how can i change the haeder so on the screen it points to xxx.duckdns.org but under the hood it uses IP:PORT of service1.

Further why does it only work with the /service1/ and not with /service1

It's also hard to find clear explanations about advanced variables and proxy-manager specific.

I've updated the networkpicture with the docker networks.

nginx

Hoping to get it working without issues, so i can make the next step. Turning it in to HTTPS.

<!-- gh-comment-id:743800910 --> @NightFalcon650 commented on GitHub (Dec 12, 2020): Thanks for the reply. I've tryed it and it works partly. I've to put the / behind the adresses and the location parts, otherwise it's giving the 404 error. ![image](https://user-images.githubusercontent.com/7109209/101992490-fa3c4b00-3cb3-11eb-90d1-7586ff5bee97.png) But with the location part, the site gets loaded, but at the moment that the site has to load it's files it gives 502 bad gateway errors. I've tried it with service1 xxx.duckdns.org points to IP:PORT ![image](https://user-images.githubusercontent.com/7109209/101992214-d5df6f00-3cb1-11eb-838d-a840ec5b1afb.png) xxx.duckdns.org/service1 point to the same IP but a other port IP:PORT. ![image](https://user-images.githubusercontent.com/7109209/101992327-ada44000-3cb2-11eb-9d40-30b0c5f9ec2f.png) The service1 expects to load it's stuff from IP:PORT/.... etc. But the proxy points to xxx.duckdns.org/index.html So the location file points to the right place, but how can i change the haeder so on the screen it points to xxx.duckdns.org but under the hood it uses IP:PORT of service1. Further why does it only work with the /service1/ and not with /service1 It's also hard to find clear explanations about advanced variables and proxy-manager specific. I've updated the networkpicture with the docker networks. ![nginx](https://user-images.githubusercontent.com/7109209/101992574-b564e400-3cb4-11eb-8a6b-64dbfc285fe6.png) Hoping to get it working without issues, so i can make the next step. Turning it in to HTTPS.
Author
Owner

@spcqike commented on GitHub (Dec 13, 2020):

I guess you won’t find explanation for proxy related things, because NPM is just a web GUI for nginx. So you need to look up nginx.

Idrk but I think you need the ending / so that your path is interpreted as path to a folder and not path to a file without extension (like a Index without .html or .php or like a htaccess)

As I mentioned before you need a location of / that uses IP/path/ and Port. Right now you have a location named /service/ that uses IP and Port. Have a closer look on my second image in my previous post.

Is there a reason for having 3 docker networks? If not I would use one network. So that nginx can access the services directly within Docker (pointing to Docker Container Name).
I guess for a small website this wouldn’t hardly matter at all, but you would save routings / forwards and you have less problems if the IP address of your hosts change (like if you want to migrate the setup to a new location/ server)

<!-- gh-comment-id:743973197 --> @spcqike commented on GitHub (Dec 13, 2020): I guess you won’t find explanation for proxy related things, because NPM is just a web GUI for nginx. So you need to look up nginx. Idrk but I think you need the ending / so that your path is interpreted as path to a folder and not path to a file without extension (like a Index without .html or .php or like a htaccess) As I mentioned before you need a location of / that uses IP/path/ and Port. Right now you have a location named /service/ that uses IP and Port. Have a closer look on my second image in my previous post. Is there a reason for having 3 docker networks? If not I would use one network. So that nginx can access the services directly within Docker (pointing to Docker Container Name). I guess for a small website this wouldn’t hardly matter at all, but you would save routings / forwards and you have less problems if the IP address of your hosts change (like if you want to migrate the setup to a new location/ server)
Author
Owner

@NightFalcon650 commented on GitHub (Dec 15, 2020):

I guess you won’t find explanation for proxy related things, because NPM is just a web GUI for nginx. So you need to look up nginx.

Idrk but I think you need the ending / so that your path is interpreted as path to a folder and not path to a file without extension (like a Index without .html or .php or like a htaccess)

As I mentioned before you need a location of / that uses IP/path/ and Port. Right now you have a location named /service/ that uses IP and Port. Have a closer look on my second image in my previous post.

Is there a reason for having 3 docker networks? If not I would use one network. So that nginx can access the services directly within Docker (pointing to Docker Container Name).
I guess for a small website this wouldn’t hardly matter at all, but you would save routings / forwards and you have less problems if the IP address of your hosts change (like if you want to migrate the setup to a new location/ server)

Mmm searching for nginx didn't bring something.. i'll keep on searching.

Looked in the js files and it's done with regular expression. but it works with the slashes except for the first part of the url (the root).

Reason for the seperate networks, is that some containers (homeassistant for example have there own network. So al the parts are arranged in there own basic environments..

<!-- gh-comment-id:745455895 --> @NightFalcon650 commented on GitHub (Dec 15, 2020): > I guess you won’t find explanation for proxy related things, because NPM is just a web GUI for nginx. So you need to look up nginx. > > Idrk but I think you need the ending / so that your path is interpreted as path to a folder and not path to a file without extension (like a Index without .html or .php or like a htaccess) > > As I mentioned before you need a location of / that uses IP/path/ and Port. Right now you have a location named /service/ that uses IP and Port. Have a closer look on my second image in my previous post. > > Is there a reason for having 3 docker networks? If not I would use one network. So that nginx can access the services directly within Docker (pointing to Docker Container Name). > I guess for a small website this wouldn’t hardly matter at all, but you would save routings / forwards and you have less problems if the IP address of your hosts change (like if you want to migrate the setup to a new location/ server) Mmm searching for nginx didn't bring something.. i'll keep on searching. Looked in the js files and it's done with regular expression. but it works with the slashes except for the first part of the url (the root). Reason for the seperate networks, is that some containers (homeassistant for example have there own network. So al the parts are arranged in there own basic environments..
Author
Owner

@mossaab commented on GitHub (Dec 29, 2020):

traefik is the best solution for your case

<!-- gh-comment-id:751924622 --> @mossaab commented on GitHub (Dec 29, 2020): traefik is the best solution for your case
Author
Owner

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

As this is about nginx not NPM specifically, I will close this.

<!-- gh-comment-id:840114763 --> @chaptergy commented on GitHub (May 12, 2021): As this is about nginx not NPM specifically, I will close this.
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#650
No description provided.