SOURCES: varnish.sysconfig - use variables in config -- more flexible

glen glen at pld-linux.org
Mon Jul 2 18:59:20 CEST 2007


Author: glen                         Date: Mon Jul  2 16:59:20 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use variables in config -- more flexible

---- Files affected:
SOURCES:
   varnish.sysconfig (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/varnish.sysconfig
diff -u SOURCES/varnish.sysconfig:1.3 SOURCES/varnish.sysconfig:1.4
--- SOURCES/varnish.sysconfig:1.3	Mon Jul  2 18:50:17 2007
+++ SOURCES/varnish.sysconfig	Mon Jul  2 18:59:15 2007
@@ -8,81 +8,50 @@
 # Open files (usually 1024, which is way too small for varnish)
 SERVICE_LIMITS="-n 131072"
 
-# This file contains 4 alternatives, please use only one.
-
-## Alternative 1, Minimal configuration, no VCL
-#
-# 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 :6081 \
-#             -T localhost:6082 \
-#             -b localhost:8080 \
-#             -s file,/var/lib/varnish/varnish_storage.bin,1G"
-
-
-## Alternative 2, Configuration with VCL
-#
-# 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 cache file.
-#
-DAEMON_OPTS="-a :6081 \
-             -T localhost:6082 \
-             -f /etc/varnish/default.vcl \
-             -s file,/var/lib/varnish/varnish_storage.bin,1G"
-
-
-## Alternative 3, Advanced configuration
+# 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
-# # 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 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_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} \
-#              -f ${VARNISH_VCL_CONF} \
-#              -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
-#              -t ${VARNISH_TTL} \
-#              -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
-#              -s ${VARNISH_STORAGE}"
-#
+# Main configuration file. You probably want to change it :)
+VARNISH_VCL_CONF=/etc/varnish/default.vcl
 
-
-## Alternative 4, Do It Yourself. See varnishd(1) for more information.
-#
-# DAEMON_OPTS=""
+# Default address and port to bind to
+# 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 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_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} \
+             -f ${VARNISH_VCL_CONF} \
+             -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
+             -t ${VARNISH_TTL} \
+             -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
+             -s ${VARNISH_STORAGE}"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/varnish.sysconfig?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list