Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/httpd: rename apache log files to have a .log file extension #54529

Merged
merged 3 commits into from Jan 31, 2019

Conversation

aanderse
Copy link
Member

Motivation for this change

I'd like to be able to easily logrotate apache logs. Other main distros give their apache logs a .log file extension so easy logrotate rules can be written (like /var/log/httpd/*.log). Currently with the way virtual host logs are named there is no straight forward way to logrotate files.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/nixos-19-03-feature-freeze/1950/6

@aanderse
Copy link
Member Author

Discussion on discourse about moving to journald for apache logging, so putting this on hold for now.

@aanderse aanderse changed the title nixos/httpd: rename apache log files to have a .log file extension WIP: nixos/httpd: rename apache log files to have a .log file extension Jan 24, 2019
@danbst
Copy link
Contributor

danbst commented Jan 30, 2019

Moving to journald is completely different issue (and, I'd say, optional one!). I'd merge this, but I wonder if it requires release notes.

Also, logrotate should understand /var/log/httpd/*, why not?

@aanderse
Copy link
Member Author

@danbst sure logrotate understands it, but then logrotate will start rotating the rotation files as they end up in the same directory.

Yeah mod_journald isn't out until apache 2.5 and this change would sure make things better until then...

Let me write up some release notes mentioning the change in file names and we can leave the journald stuff alone until 2.5 is out.

Sound reasonable?

@danbst
Copy link
Contributor

danbst commented Jan 30, 2019

Oh, right, but what about /var/log/httpd/*_log?

Sound reasonable?

yeah

@aanderse
Copy link
Member Author

That doesn't account for virtual hosts as those log files don't end in _log but instead the host name.

@danbst
Copy link
Contributor

danbst commented Jan 30, 2019

oh crap. Ok then, waiting for release doc and then can be merged.

@aanderse
Copy link
Member Author

@danbst let me know if this works for you. Thanks!

@aanderse aanderse changed the title WIP: nixos/httpd: rename apache log files to have a .log file extension nixos/httpd: rename apache log files to have a .log file extension Jan 31, 2019
@danbst danbst merged commit c6cd077 into NixOS:master Jan 31, 2019
@danbst
Copy link
Contributor

danbst commented Jan 31, 2019

@aanderse thanks!

@aanderse aanderse deleted the apache-dot-log branch January 31, 2019 02:15
aanderse added a commit to aanderse/nixpkgs that referenced this pull request Feb 20, 2019
pull bot pushed a commit to evanjs/nixpkgs that referenced this pull request Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants