NginxProxyManager / NginxProxyManager/nginx-proxy-manager
Change access log filenames to domain name (or add option)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 34.2k
- Forks
- 3.9k
- Avg merge
- 21h 12m
- Merged PRs (30d)
- 20
Description
Is your feature request related to a problem? Please describe.
It's very frustrating to try and determine which log file is for which site since they are all named after the arbitrary ID that they are assigned when created.
Describe the solution you'd like
It would be nice to instead have them named after the first domain in the domain_names list.
~BEFORE~
# ls
proxy_host-1.log proxy_host-10.log proxy_host-11.log proxy_host-2.log proxy_host-3.log proxy_host-4.log proxy_host-5.log proxy_host-6.log proxy_host-7.log proxy_host-8.log proxy_host-9.log
~AFTER~
# ls
domain.example.com.log fqdn.something.log ...
Using the template on how the domain names are set for server_name, I assume this can be accomplished by simply changing the access log line to something like this (proxy host as the example):
access_log /data/logs/{{ domain_names[0] }}.log proxy;
OR
access_log /data/logs/{{ domain_names | first }}.log proxy;
Describe alternatives you've considered
I tried to just add a custom access_log line to the advanced configuration, but instead of overwriting the previous setting it sends logs to both files.
Additional context
N/A
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
Start with backend/templates/_listen.conf at the server_name template referenced in the issue, then locate the access_log directives for proxy hosts. Check how the generated configuration derives log filenames and whether custom advanced configuration causes duplicate logging. Done means access logs use the first domain name, or a documented option, without retaining unintended duplicate output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 66/100