Skip to content

Instantly share code, notes, and snippets.

@nicovs
Created November 6, 2013 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicovs/7333544 to your computer and use it in GitHub Desktop.
Save nicovs/7333544 to your computer and use it in GitHub Desktop.
etc/default/varnish
# file managed by puppet
#
# Configuration file for varnish
#
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK
# to be set from this shell script fragment.
#
# Should we start varnishd at boot? Set to "yes" to enable.
START=yes
# Maximum number of open files (for ulimit -n)
NFILES="131072"
ulimit -n $NFILES
# 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"
ulimit -l $MEMLOCK
# Default varnish instance name is the local nodename. Can be overridden with
# the -n switch, to have more instances on a single server.
INSTANCE="hiddeninstancename"
# Maximum size of corefile (for ulimit -c). Default in Fedora is 0
# DAEMON_COREFILE_LIMIT="unlimited"
DAEMON_COREFILE_LIMIT="0"
ulimit -S -c $DAEMON_COREFILE_LIMIT
## Alternative 4, Do It Yourself
#
DAEMON_OPTS="-n hiddenworkdir \
-u varnish -g varnish \
-a :80 \
-T localhost:6082 \
-s malloc,256m \
-f /etc/varnish/default.vcl \
-p esi_syntax=0x1 \
-p shm_reclen=4096 \
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment