apache links for log formats, log kinds, etc
Posted by jpluimers on 2017/01/27
Am I the only one who thinks Apache logging configuration is a mess? Especially when you look at the templates shipping with various *nix distros?
Files like vhost-ssl.template and vhost.template using different ways of logging for the same thing make me cringe. This apart from ordering of configuration between the files being different, some lines doing tab-indent and others doing space-indent and non-matching spaces-per-tab settings between the files.
The apache wiki examples have different issues.
How can you expect mere mortals getting vhost configuration right when the provided templates are so bad?
Given the move towards SSL/TLS, mortals like me won’t easily get it right either.
A few things I think that should be done:
- For vhosts, standardise on vhost_combined, not combined.
- Favour CustomLog over TransferLog.
- Make a choice: either log in a Catch All log file, or put each vhost log in different files (now it’s different for the SSL and normal template).
- If using separate log files per vhost, then include a vhost reference in the log filenames.
- Add a vhost_ssl_combined in addition to ssl_combined.
- Document ErrorLog in the same place as CustomLog and TransferLog.
- Provide templates for combining regular and SSL vhost configs which currently is hard.
- Make timestamps in logging formats the same. They are different between ssl_combined and the others. Don’t you hate that? What happened to ISO-8601?