NginxProxyManager / NginxProxyManager/nginx-proxy-manager
🐞 Bug: Editing Proxy Host from IP to Hostname Does Not Update Nginx Configuration
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 34.2k
- Forks
- 3.9k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 20
Description
Checklist
- Have you pulled and found the error with
jc21/nginx-proxy-manager:latestdocker image?- Yes
- Are you sure you're not using someone else's docker image?
- Yes
- Have you searched for similar issues (both open and closed)?
- Yes (I found related issues about proxy hosts not updating correctly, but none specifically describing this workflow bug).
Describe the bug
When editing an existing Proxy Host to change the "Forward Hostname / IP" field from an IP address to a new domain name (to convert it from a forward proxy to a reverse proxy), the change does not take effect. The Nginx configuration file is not updated correctly, and requests continue to be forwarded to the old IP address. The only reliable workaround is to delete the proxy host entry and create a new one.
Nginx Proxy Manager Version
v2.12.6
To Reproduce
Steps to reproduce the behavior:
- Create a Proxy Host that forwards to an IP address (e.g.,
192.168.1.100:8080). - Confirm it works correctly by accessing the domain; it shows the application at that IP.
- Edit the existing Proxy Host.
- Change the "Forward Hostname / IP" field from the IP address to a new domain name (e.g.,
my-internal-service.local). - Save the changes. The UI confirms the host was updated successfully.
- Access the domain again. The page still shows the application from the old IP address (
192.168.1.100:8080), not the new domain name (my-internal-service.local). - Check the generated Nginx configuration file; it may still contain the old IP.
Expected behavior
After saving the changes, the Nginx configuration should be regenerated to forward traffic to the new domain name specified in the "Forward Hostname / IP" field. The change should be immediate and effective after a configuration reload.
Screenshots
(Not applicable for this text-based report, but could show the edit form and the resulting incorrect config file)
Operating System
- Hardware: Raspberry Pi 4
- OS:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" - Environment: Docker
Additional context
- Docker Version: 24.0.5, build 24.0.5-0ubuntu1~22.04.1
- This is a significant usability issue when managing many hosts, as it forces a time-consuming delete-and-recreate process and risks misconfiguration.
- The problem appears to be that the backend service does not correctly trigger a rewrite of the Nginx configuration for the specific host when this particular field is changed from an IP to a hostname.
- Restarting the NPM container or the Nginx process itself does not resolve the issue; only deletion and recreation of the host works.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the IP-to-hostname edit on v2.12.6 and inspect the backend path that handles Proxy Host updates alongside the generated Nginx configuration. Verify that the configuration is regenerated with the new hostname and requests use it after reload; the payload names no source file or test, so those will need to be located first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, nginx
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100