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
Contributor

aanderse commented Jan 24, 2019

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

This comment has been minimized.

Copy link

nixos-discourse commented Jan 24, 2019

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

This comment has been minimized.

Copy link
Contributor Author

aanderse commented Jan 24, 2019

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

aanderse commented Jan 30, 2019

@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

This comment has been minimized.

Copy link
Contributor

danbst commented Jan 30, 2019

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

Sound reasonable?

yeah

@aanderse

This comment has been minimized.

Copy link
Contributor Author

aanderse commented Jan 30, 2019

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

@danbst

This comment has been minimized.

Copy link
Contributor

danbst commented Jan 30, 2019

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

@aanderse

This comment has been minimized.

Copy link
Contributor Author

aanderse commented Jan 31, 2019

@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

10 checks passed

grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@danbst

This comment has been minimized.

Copy link
Contributor

danbst commented Jan 31, 2019

@aanderse thanks!

@aanderse aanderse deleted the aanderse:apache-dot-log branch Jan 31, 2019

aanderse added a commit to aanderse/nixpkgs that referenced this pull request Feb 20, 2019

@aanderse aanderse referenced this pull request Feb 20, 2019

Open

nixos/httpd: update documentation… #56079

2 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment