Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for chaning the HTTP and HTTPS port that hosts will listen on #4127

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

snordmann
Copy link

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

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: NginxProxyManager#4122
@csbde
Copy link

csbde commented Dec 4, 2024

Docker Image for build 2 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

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

@snordmann
Copy link
Author

@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
Copy link

csbde commented Dec 5, 2024

@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.

image

@snordmann snordmann marked this pull request as draft December 5, 2024 15:23
@nginxproxymanagerci
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants