Last active
December 3, 2019 11:16
-
-
Save stephen-mw/5549788 to your computer and use it in GitHub Desktop.
Init and logrotate script for varnishncsa logging process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logrotate script for varnishnca | |
# /etc/logrotate.d/varnishncsa | |
# | |
/var/log/varnish/varnishncsa.log { | |
daily | |
rotate 7 | |
missingok | |
compress | |
delaycompress | |
missingok | |
postrotate | |
service varnishncsa reload > /dev/null | |
endscript | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# varnishncsa - Logging daemon for varnish | |
# /etc/init/varnishncsa | |
description "logging daemon for varnish" | |
env LOG_OPTIONS="%h %l %u %t '%r' %s %b '%{Varnish:time_firstbyte}x' %{Varnish:handling}x" | |
start on started varnish | |
stop on stopped varnish | |
respawn | |
exec /usr/bin/varnishncsa -a -F "$LOG_OPTIONS" -w /var/log/varnish/varnishncsa.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment