Support for chaning the HTTP and HTTPS port that hosts will listen on
I have seen a few issues that mention that changing the port that nginx listens on is important (especially when using hostNetwork).
I am not totally convinced that NPM should allow these use-cases but I was bored enough to implement it anyway.
Related Issue: #4122
Docker Image for build 2 is available on DockerHub as
nginxproxymanager/nginx-proxy-manager-dev:pr-4127Note: ensure you backup your NPM instance before testing this image! Especially if there are database changes Note: this is a different docker image namespace than the official image
Thank you very much to the developers for their hard work. I sincerely hope to have this feature, as it would allow for more flexible deployment. However, I tested this Docker, and the new feature cannot be used. My docker-compose.yml file is as follows:
services:
app:
image: 'nginxproxymanager/nginx-proxy-manager-dev:pr-4127'
restart: unless-stopped
network_mode: "host"
environment:
HTTP_PORT: "1234"
HTTPS_PORT: "5678"
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
@csbde could you please give more information what excactly went wrong?
My first guess: You are not using hostNeteork and the default ports of 80 and 443 are exposed instead of the defined ports. I could probably improve the documentation in that regard.
I will investigate on the weekend, when I have some spare time.
@csbde could you please give more information what excactly went wrong?请提供更多信息,说明到底出了什么问题?
My first guess: You are not using hostNeteork and the default ports of 80 and 443 are exposed instead of the defined ports. I could probably improve the documentation in that regard.我的第一个猜测是:您没有使用 hostNeteork,因此默认的 80 和 443 端口而不是定义的端口被暴露了。我也许可以改进这方面的文档。
I will investigate on the weekend, when I have some spare time.我将在周末有空时进行调查。
Re
Thank you for your reply. I am using the host network mode and can successfully access the management panel through port 81. I can also access the Nginx page via ports 80 and 443, but the defined ports cannot be accessed.
Below is the configuration file display I checked after entering the Docker.
Docker Image for build 3 is available on
DockerHub
as nginxproxymanager/nginx-proxy-manager-dev:pr-4127
Note: ensure you backup your NPM instance before testing this image! Especially if there are database changes Note: this is a different docker image namespace than the official image
PR is now considered stale. If you want to keep it open, please comment :+1: