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

Custom listening port 80 443 81

Open 907739769 opened this issue 1 year ago • 4 comments

使用host网络模式安装npm,自定义80 81 443监听端口,目前我是挂载./templates:/app/templates和./default.conf:/etc/nginx/conf.d/default.conf,手动修改文件里面的端口。存量数据是修改了/data/nginx/proxy_host/*.conf文件里面的端口。能不能增加环境变量调整监听端口?

Install npm using host network mode, customize the 80 81 443 listening port, currently I am mounting ./templates:/app/templates and ./default.conf:/etc/nginx/conf.d/default.conf, and manually modify the port in the file. The stock data is the port in the /data/nginx/proxy_host/*.conf file that has been modified. Can you add environment variables to adjust the listening port?

907739769 avatar Aug 31 '25 10:08 907739769

哦兄弟,你简直是英雄.我在尝试NPM + fail2ban.容器必须开启host模式才能返回真实访问者的IP.国内国情又特殊,443和80端口全被锁了.我配合AI摸索了一下午,最后也只摸索出来修改/data/nginx/proxy_host/*.conf. 实在没办法了,准备来issue看看.没想到竟然有答案.

Oh brother, you’re truly a hero. I’ve been trying to configure fail2ban, and the container must run in host mode to return the real visitor’s IP. But since in China ports 443 and 80 are all blocked, I’ve been struggling. I spent the whole afternoon experimenting with AI, and in the end I only managed to figure out how to modify /data/nginx/proxy_host/*.conf. I was out of options and was about to open an issue for help, but I didn’t expect to actually find the answer here.

BlueDementedTomCat avatar Sep 03 '25 10:09 BlueDementedTomCat

the same with you, and you can test and use my build https://hub.docker.com/r/popozhu/nginx-proxy-manager-with-other-ports

popozhu avatar Sep 06 '25 17:09 popozhu

the same with you, and you can test and use my build https://hub.docker.com/r/popozhu/nginx-proxy-manager-with-other-ports

谢谢,终于解决了非443标准端口问题了,谢谢,在官方没有添加这个功能前,我就一直跟着你的镜像用了,谢谢

snakwu avatar Sep 26 '25 09:09 snakwu

@jc21 I hope that custom port function can be supported, thank you.

snakwu avatar Sep 27 '25 07:09 snakwu