85 lines
2.8 KiB
Plaintext
85 lines
2.8 KiB
Plaintext
|
# Configuration file for varnish
|
||
|
#
|
||
|
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
|
||
|
# to be set from this shell script fragment.
|
||
|
#
|
||
|
# Set this to 1 to make systemd reload try to switch vcl without restart.
|
||
|
RELOAD_VCL=1
|
||
|
|
||
|
# Maximum number of open files (for ulimit -n)
|
||
|
NFILES=131072
|
||
|
|
||
|
# Maximum locked memory size (for ulimit -l)
|
||
|
# Used for locking the shared memory log in memory. If you increase log size,
|
||
|
# you need to increase this number as well
|
||
|
MEMLOCK=82000
|
||
|
|
||
|
# Default varnish instance name is the local nodename. Can be overridden with
|
||
|
# the -n switch, to have more instances on a single server.
|
||
|
INSTANCE=$(uname -n)
|
||
|
|
||
|
|
||
|
## 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
|
||
|
# # 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={{ varnish_listen_port }}
|
||
|
#
|
||
|
# # Telnet admin interface listen address and port
|
||
|
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
|
||
|
VARNISH_ADMIN_LISTEN_PORT=6082
|
||
|
#
|
||
|
# Shared secret file for admin interface
|
||
|
VARNISH_SECRET_FILE=/etc/varnish/secret
|
||
|
|
||
|
# # The minimum number of worker threads to start
|
||
|
VARNISH_MIN_THREADS=2
|
||
|
#
|
||
|
# # The Maximum number of worker threads to start
|
||
|
VARNISH_MAX_THREADS=500
|
||
|
#
|
||
|
# # Idle timeout for worker threads
|
||
|
VARNISH_THREAD_TIMEOUT=120
|
||
|
#
|
||
|
# # Cache file location
|
||
|
VARNISH_STORAGE_FILE={{ varnish_storage_file }}
|
||
|
#
|
||
|
# # 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={{ varnish_storage_size }}
|
||
|
#
|
||
|
#
|
||
|
# # Backend storage specification
|
||
|
VARNISH_STORAGE="file,{{ varnish_storage_file }},{{ varnish_storage_size }}"
|
||
|
#
|
||
|
# # Default TTL used when the backend does not specify one
|
||
|
VARNISH_TTL={{ varnish_ttl }}
|
||
|
#
|
||
|
# User and group for the varnishd worker processes
|
||
|
VARNISH_USER={{ varnish_user }}
|
||
|
VARNISH_GROUP={{ varnish_group }}
|
||
|
# # 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_SECRET_FILE} \
|
||
|
# -s ${VARNISH_STORAGE} \
|
||
|
# -p sess_workspace=262144 \
|
||
|
# -p default_keep=${VARNISH_TTL} \
|
||
|
# -p sess_timeout=360 \
|
||
|
# -p thread_pools=1 \
|
||
|
# -p thread_pool_min=200 -p thread_pool_max=4000 \
|
||
|
# -p thread_pool_add_delay=2 -p session_linger=100 \
|
||
|
# -s file,{{ varnish_ram_cache_size }}M
|
||
|
# "
|
||
|
|