Description
Varnish is a caching front-end server. This document has notes how to use Varnish with Plone.
The following snippet will restart a varnishd instance which has been started from plone.recipe.varnish buildout directly invoking bin/varnish-instance command.
It will also create Apache compatible log file which you can examinen using text editing tools by running varnishncsa command which will read log data from Varnish memory mapped file and write it to a text file in Apache format.
Example:
#!/bin/sh
# Varnish restart script
sudo killall varnishd
sudo bin/varnish-instance
# Create Apache compatible log file
sudo kill `cat var/varnishncsa.pid`
sudo parts/varnish-build/bin/varnishncsa -D -d -a -w var/log/varnish.log -P var/varnishncsa.pid
Management console must be enabled in Varnish buildout settings.
Example:
ssh yourhost
telnet localhost 8088
ノート
Port number depends on your Varnish settings.