From: des Date: Wed, 16 May 2007 20:02:08 +0000 (+0000) Subject: Tweak some of the defaults: X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb7a3a46d51af58e3d7d0e1d714f8a88e05e5c27;p=varnish Tweak some of the defaults: - bind to all interfaces - use a 1 gibibyte - remove hash setting, it's not safe - tweak some variable names and comments git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1438 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/debian/varnish.default b/varnish-cache/debian/varnish.default index 74b58c73..213c882c 100644 --- a/varnish-cache/debian/varnish.default +++ b/varnish-cache/debian/varnish.default @@ -1,5 +1,5 @@ # Configuration file for varnish -# +# # /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this # shell script fragment. # @@ -8,81 +8,74 @@ ## Alternative 1, Minimal configuration, no VCL # -# Listen on localhost:6081, administration on localhost:6082, and forward to -# content server on localhost:8080. Use a fixed size file storage. +# Listen on port 6081, administration on localhost:6082, and forward to +# content server on localhost:8080. Use a fixed-size cache file. # -DAEMON_OPTS="-a localhost:6081 \ +DAEMON_OPTS="-a :6081 \ -T localhost:6082 \ -b localhost:8080 \ - -s file,/var/lib/varnish/varnish_storage.bin,10485760" + -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 2, Configuration with VCL # -# Listen on localhost:6081, administration on localhost:6082, and forward to +# Listen on port 6081, administration on localhost:6082, and forward to # one content server selected by the vcl file, based on the request. Use a -# fixed size file storage. +# fixed-size cache file. # -# DAEMON_OPTS="-a localhost:6081 \ +# DAEMON_OPTS="-a :6081 \ # -T localhost:6082 \ # -f /etc/varnish/default.vcl \ -# -s file,/var/lib/varnish/varnish_storage.bin,10485760" +# -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 3, Advanced configuration # # See varnishd(1) for more information. -# +# # # Main configuration file. You probably want to change it :) # VARNISH_VCL_CONF=/etc/varnish/default.vcl -# +# # # Default address and port to bind to -# VARNISH_LISTEN_ADDRESS=0.0.0.0 +# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify +# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets. +# VARNISH_LISTEN_ADDRESS= # VARNISH_LISTEN_PORT=6081 -# -# +# # # Telnet admin interface listen address and port # VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 # VARNISH_ADMIN_LISTEN_PORT=6082 -# -# -# # The minimum number of threads to start -# VARNISH_MIN_WORKER_THREADS=1 -# -# -# # Maximum number of worker threads or INF for unlimited -# VARNISH_MAX_WORKER_THREADS=2048 -# -# -# # Timeout value in seconds for threads to return -# VARNISH_WORKER_THREAD_TIMEOUT=10 -# -# -# # Hash algorithm to be used -# VARNISH_HASHOPTION=classic -# -# -# # Maximum size of the backend storagefile in bytes -# VARNISH_BACKEND_STORAGE_SIZE=10240000 -# VARNISH_BACKEND_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin -# -# +# +# # The minimum number of worker threads to start +# VARNISH_MIN_THREADS=1 +# +# # The Maximum number of worker threads to start +# VARNISH_MAX_THREADS=1000 +# +# # Idle timeout for worker threads +# VARNISH_THREAD_TIMEOUT=120 +# +# # Cache file location +# VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin +# +# # Cache file size: in bytes, optionally using k / M / G / T suffix, +# # or in percentage of available disk space using the % suffix. +# VARNISH_STORAGE_SIZE=1G +# # # Backend storage specification -# VARNISH_BACKEND_STORAGE="file,${VARNISH_BACKEND_STORAGE_FILE},${VARNISH_BACKEND_STORAGE_SIZE}" -# -# -# # Set default ttl in secounds +# VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}" +# +# # Default TTL used when the backend does not specify one # VARNISH_TTL=120 -# +# # # DAEMON_OPTS is used by the init script. If you add or remove options, make # # sure you update this section, too. # DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ -# -h ${VARNISH_HASHOPTION} \ # -f ${VARNISH_VCL_CONF} \ # -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ # -t ${VARNISH_TTL} \ -# -w ${VARNISH_MIN_WORKER_THREADS},${VARNISH_MAX_WORKER_THREADS},${VARNISH_WORKER_THREAD_TIMEOUT} \ -# -s ${VARNISH_BACKEND_STORAGE}" +# -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ +# -s ${VARNISH_STORAGE}" #