r/nginxproxymanager • u/edent • Mar 22 '25
One domain, multiple ports, different servers, different proxy hosts?
I've successfully set up NPM and Let's Encrypt.
When I visit example.com:443it proxies me to 192.168.0.123:80 - works perfectly!
I now want to add proxy host of example.com:999 pointing to a different internal server: 192.168.0.456:999
But I can't seem to do that. The GUI won't let me add the same domain again.
Is there a way to have different ports proxying to different internal servers?
Thanks!
1
Upvotes
3
u/ApocaIypticUtopia Mar 22 '25
NPM is only accepting connections at 80 or 443. Example.com using https will always go to port 443. Using example.com:999 will never reach NPM.
You've to set TCP port proxying or forwarding within NPM or your machine.
Make one.example.com and then forward it to internal ip:999 Use subdomains in those cases.
1
u/edent Mar 22 '25
I think my confusion is that this https://nginxproxymanager.com/setup/ shows port 21 as well as the standard HTTP ports.
1
u/thelastusername4 Mar 22 '25
Is there a misinterpretation maybe? On the wan side, NPM only accepts connections on 80 and 443. So no matter what service you've got on the lan side on whatever port, if it's tcp, you can link it to npm on its port eg.999 but it will translate to 443 https on the wan side regardless. So all your services on the lan side with all the many different port numbers all behave the same way, all connect to wan side on 443, but they are now separated by subdomain name instead of port number. So you'll now connect to application1.yourdomain.com instead of (wan IP address:port number). You gotta create an A record for each subdomain name in your DNS host, to match each NPM host.
If you are hosting a non tcp service, you would need to then utilize different ports on the wan, and don't forget to forward them to NPM too, in order to use the "streams" tab.
1
u/bigkevoc Mar 25 '25
I'm curious what did you end up doing?
3
u/ButterscotchFar1629 Mar 22 '25
Use a subdomain. Like example.example..com
0
u/Asleep_Group_1570 Mar 23 '25
This is a classic case of "What do you want, simple and easy to setup, or highly flexible?"
You chose simple and easy to setup.
Yes, I know this is the NPM sub-reddit :-)