Revision of Logging from Mon, 03/07/2011 - 12:14

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

Running Varnish in front of your web server will mess up your normal Apache log files as the majority of traffic will be served from the cache. Varnish normally writes its log information to memory, but includes the varnishncsa program which displays the data in the Apache/NCSA combined format and can write that data to a file.

varnishncsa Startup
With Varnish installed from source, daemontools is an easy way to run the logging daemon. If you haven't already, install daemontools.

Create a directory for the varnishncsa service:

mkdir -m 1755 /var/service/varnishncsa
cd /var/service/varnishncsa

Create the run script and make it executable:

echo '#!/bin/sh' > run
echo 'exec 2>&1' >> run
echo 'exec varnishncsa' >> run
chmod 755 run

Our log script comes from John Simpson's:

mkdir -m 755 log
cd log
wget http://qmail.jms1.net/scripts/service-any-log-run
mv service-any-log-run run
chmod 755 run

Finally, add the service to daemontools by creating the symbolic link in /service

ln -s /var/service/varnishncsa /service/varnishncsa

Confirm that the service is running:

svstat /service/varnishncsa /service/varnishncsa/log

In order to show the proper

Resources
http://cainmanor.com/tech/setup-logging-for-varnish

Recent Updates

  • 2 years 3 weeks ago
  • 2 years 3 weeks ago
  • 2 years 3 weeks ago
    php 8.x
  • 2 years 3 weeks ago
    10.6.7
  • 2 years 4 weeks ago
    Drop Centos 5/6 stuff