Skip to content

Changed filenames to include first domain or inbound port#5515

Open
joewesch wants to merge 1 commit intoNginxProxyManager:developfrom
joewesch:746_better-filenames
Open

Changed filenames to include first domain or inbound port#5515
joewesch wants to merge 1 commit intoNginxProxyManager:developfrom
joewesch:746_better-filenames

Conversation

@joewesch
Copy link
Copy Markdown

@joewesch joewesch commented May 2, 2026

Closes: #746

This PR is an upgraded replacement for #2606.

This PR changes all config filenames to be id.first_domain for proxy_host, redirection_host or dead_host and id.incoming_port for stream. Each type will fall back to just id if there are no domains or if the type is undefined. All log files will also be renamed accordingly automatically.

# Before
[root@docker-a8439ada89f2:/app]# ls /data/nginx/proxy_host/
1.conf
[root@docker-a8439ada89f2:/app]# ls /data/logs/
fallback_error.log
fallback_http_access.log
fallback_http_error.log
fallback_stream_access.log
proxy-host-1_access.log
proxy-host-1_error.log

# After
[root@docker-a8439ada89f2:/app]# ls /data/nginx/proxy_host/
1.test.example.com.conf
[root@docker-a8439ada89f2:/app]# ls /data/logs/
fallback_error.log
fallback_http_access.log
fallback_http_error.log
fallback_stream_access.log
proxy-host-1.test.example.com_access.log
proxy-host-1.test.example.com_error.log

This will also happen if the user either adds a domain to the host that sorts alphabetically first or if they remove the first domain. These changes will not take effect immediately, which seems to be in-line with the rest of the upgrades in this project. They will instead update the next time each host is saved.

@nginxproxymanagerci
Copy link
Copy Markdown

Docker Image for build 1 is available on DockerHub:

nginxproxymanager/nginx-proxy-manager-dev:pr-5515

Note

Ensure you backup your NPM instance before testing this image! Especially if there are database changes.
This is a different docker image namespace than the official image.

Warning

Changes and additions to DNS Providers require verification by at least 2 members of the community!

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.

Change access log filenames to domain name (or add option)

1 participant