Skip to content

Instantly share code, notes, and snippets.

@nigoroll
Last active June 16, 2020 16:59
Show Gist options
  • Save nigoroll/3b5ba17cf67aaf617c2a851950575daf to your computer and use it in GitHub Desktop.
Save nigoroll/3b5ba17cf67aaf617c2a851950575daf to your computer and use it in GitHub Desktop.
[Service]
ExecStart=
ExecStart=/opt/varnish/sbin/varnishd \
-a http=:80 \
-a tls=/shared/varnish_haproxy/varnish_proxy,PROXY,mode=777 \
-p feature=+http2 \
-p vcl_path=/etc/varnish:/opt/varnish/share/varnish/vcl \
-f /etc/varnish/default.vcl -s malloc,256m
ExecReload=
ExecReload=/opt/varnish/sbin/varnishreload -m 3 -w 10
[Unit]
Description=Varnish Cache, a high-performance HTTP accelerator
After=network-online.target
[Service]
Type=forking
KillMode=process
# Maximum number of open files (for ulimit -n)
LimitNOFILE=131072
# Locked shared memory - should suffice to lock the shared memory log
# (varnishd -l argument)
# Default log size is 80MB vsl + 1M vsm + header -> 82MB
# unit is bytes
LimitMEMLOCK=85983232
# Enable this to avoid "fork failed" on reload.
TasksMax=infinity
# Maximum size of the corefile.
LimitCORE=infinity
ExecStart=/opt/varnish/sbin/varnishd -a :6081 -f /etc/varnish/default.vcl -s malloc,256m
ExecReload=/opt/varnish/sbin/varnishreload
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment