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

Changes log filenames from ID to (first) domain

Open joewesch opened this issue 2 years ago • 8 comments

Closes: #746

This change would be slightly not backwards compatible as the log filenames would change for all new logs and all existing files would be abandoned and not pruned. Any guidance or assistance to add this as a setting in the UI or something rather than just change the default would be welcomed.

joewesch avatar Feb 11 '23 00:02 joewesch

Hi Joewesch, nice change. Did you checked what will happen, if more then one domain is entered into the gui by creating a new host ?

KGBist2000 avatar Feb 13 '23 20:02 KGBist2000

Hello @KGBist2000.

Yes, it uses the alphabetically first domain in the filename. For example, if you create a proxy host with the 2 domains beta.example.com and alpha.example.com the log files would be proxy-host-alpha.example.com_access.log and proxy-host-alpha.example.com_error.log.

I have been using this method for quite some time with no problems starting shortly after I opened the linked issue. I only just recently was reminded I never put in a PR via a recent comment on the issue.

joewesch avatar Feb 13 '23 20:02 joewesch

I'm very interested in this, any idea if it's possible to change the log filename from ID to domain? Adding the option to read the logs in the GUI would also be cool because right now it's difficult to find a particular log for a dozen or more vhosts.

csantospminds avatar May 09 '23 14:05 csantospminds

Could this be expanded to name the conf files in a similar manner?

hirenshah avatar Oct 07 '23 17:10 hirenshah

Is this PR still being considered?

pXius avatar Aug 05 '24 16:08 pXius

Pinging @jc21 to see if there is any feedback?

joewesch avatar Aug 05 '24 16:08 joewesch

PR is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Jun 13 '25 02:06 github-actions[bot]

Docker Image for build 10 is available on DockerHub:

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

[!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!