PageRenderTime 102ms CodeModel.GetById 41ms app.highlight 1ms RepoModel.GetById 59ms app.codeStats 0ms

/silverlining/server-root/etc/default/varnish

https://bitbucket.org/ianb/silverlining/
#! | 97 lines | 86 code | 11 blank | 0 comment | 0 complexity | 20ba6b6612f26157263941d06be03087 MD5 | raw file
 1# Configuration file for varnish
 2#
 3# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
 4# to be set from this shell script fragment.
 5#
 6
 7# Maximum number of open files (for ulimit -n)
 8NFILES=131072
 9
10# Maximum locked memory size (for ulimit -l)
11# Used for locking the shared memory log in memory.  If you increase log size,
12# you need to increase this number as well
13MEMLOCK=82000
14
15# Default varnish instance name is the local nodename.  Can be overridden with
16# the -n switch, to have more instances on a single server.
17INSTANCE=$(uname -n)
18
19# This file contains 4 alternatives, please use only one.
20
21## Alternative 1, Minimal configuration, no VCL
22#
23# Listen on port 6081, administration on localhost:6082, and forward to
24# content server on localhost:8080.  Use a 1GB fixed-size cache file.
25#
26# DAEMON_OPTS="-a :6081 \
27#              -T localhost:6082 \
28# 	     -b localhost:8080 \
29# 	     -u varnish -g varnish \
30# 	     -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"
31
32
33## Alternative 2, Configuration with VCL
34#
35# Listen on port 6081, administration on localhost:6082, and forward to
36# one content server selected by the vcl file, based on the request.  Use a 1GB
37# fixed-size cache file.
38#
39DAEMON_OPTS="-a :80 \
40             -T localhost:6082 \
41             -f /etc/varnish/default.vcl \
42             -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"
43
44
45## Alternative 3, Advanced configuration
46#
47# See varnishd(1) for more information.
48#
49# # Main configuration file. You probably want to change it :)
50# VARNISH_VCL_CONF=/etc/varnish/default.vcl
51#
52# # Default address and port to bind to
53# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify
54# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets.
55# VARNISH_LISTEN_ADDRESS=
56# VARNISH_LISTEN_PORT=6081
57#
58# # Telnet admin interface listen address and port
59# VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
60# VARNISH_ADMIN_LISTEN_PORT=6082
61#
62# # The minimum number of worker threads to start
63# VARNISH_MIN_THREADS=1
64#
65# # The Maximum number of worker threads to start
66# VARNISH_MAX_THREADS=1000
67#
68# # Idle timeout for worker threads
69# VARNISH_THREAD_TIMEOUT=120
70#
71# # Cache file location
72# VARNISH_STORAGE_FILE=/var/lib/varnish/$INSTANCE/varnish_storage.bin
73#
74# # Cache file size: in bytes, optionally using k / M / G / T suffix,
75# # or in percentage of available disk space using the % suffix.
76# VARNISH_STORAGE_SIZE=1G
77#
78# # Backend storage specification
79# VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}"
80#
81# # Default TTL used when the backend does not specify one
82# VARNISH_TTL=120
83#
84# # DAEMON_OPTS is used by the init script.  If you add or remove options, make
85# # sure you update this section, too.
86# DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
87#              -f ${VARNISH_VCL_CONF} \
88#              -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
89#              -t ${VARNISH_TTL} \
90#              -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
91#              -s ${VARNISH_STORAGE}"
92#
93
94
95## Alternative 4, Do It Yourself
96#
97# DAEMON_OPTS=""