nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

How to listen to other port than 80/443

Open eranwo opened this issue 3 years ago • 4 comments

Hi, First I want to thank the developers for this wonderful project. Is it possible to make a redirect of domain listen in other port then 80/443? I mean in case that we need to redirect domain.com:7007 to domain2.com (and secure the port 7007) This is useful for example for Internet radio stations that used to broadcast on port other than port 80 and want to maintain the structure of their stream URL.

eranwo avatar Jan 19 '22 07:01 eranwo

Hi if you want to receive traffic on another port e.g. 7007 you can portforward that port (either in docker or in your firewall)

for in docker image here you would need the first 80 or the first 443 to 7007 depending if the connection is https e.g 7007:80

then in NPM image place here domain2.com and use port 443

Also please change the tag to Question, this is not a bug

Kind regards

lieven121 avatar Feb 20 '22 08:02 lieven121

Thanks @lieven121 BTW, I'm not sure that I can change the label from bug to question. Could you explain how?

eranwo avatar Feb 28 '22 14:02 eranwo

I think I'm facing a similar problem as @eranwo

I want to reverse proxy multiple services on default port 443, but i additionally want to host a matrix federation server that requires me to listen to external port 8448. So for some proxy hosts, i.e. portainer.mydomain.tld i need to listen to 80 and 443, but for matrix.mydomain.tld:8448 i want to listen to 8448 as an ssl port. I am not sure how to achieve this. Is it possible to use the existing proxy host configuration but adding a listen directive in the custom configuration field?

cn-ml avatar Jun 09 '22 09:06 cn-ml

I think I'm facing a similar problem as @eranwo

I want to reverse proxy multiple services on default port 443, but i additionally want to host a matrix federation server that requires me to listen to external port 8448. So for some proxy hosts, i.e. portainer.mydomain.tld i need to listen to 80 and 443, but for matrix.mydomain.tld:8448 i want to listen to 8448 as an ssl port. I am not sure how to achieve this. Is it possible to use the existing proxy host configuration but adding a listen directive in the custom configuration field?

you can create a forward host with the port included in the domain name (matrix.mydomain.tld:8448) in your case and add this to the custom nginx config tab: listen 8448 ssl default_server;

I'm surprised this isn't done automatically

0chroma avatar Sep 17 '22 12:09 0chroma

I tried using the stream menu in the proxy manager adding listen port 8400 tcp udp, the result is: http://domain.tld:8400 (non ssl, running normally) https://domain.tld:8400 (ssl, not running) how to make ssl url work well?

gunsar avatar May 08 '23 15:05 gunsar

you can try using my workaround to use custom ports for host without default: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2969

zer0brain avatar Aug 29 '23 16:08 zer0brain

Is this something that is been worked on? DSM (Synology Nas) does it like this: grafik Could something like this be implemented? Thanks for the awsome work done here!

Technerd-SG avatar Feb 23 '24 21:02 Technerd-SG