This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
165 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Varnish environment configuration description. This was derived from | ||
# the old style sysconfig/defaults settings | ||
|
||
# Set this to 1 to make systemd reload try to switch vcl without restart. | ||
RELOAD_VCL=1 | ||
|
||
# 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=192.168.1.5 | ||
VARNISH_LISTEN_PORT=6081 | ||
|
||
# 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 and maximum number of worker threads to start | ||
VARNISH_MIN_THREADS=1 | ||
VARNISH_MAX_THREADS=1000 | ||
|
||
# Idle timeout for worker threads | ||
VARNISH_THREAD_TIMEOUT=120 | ||
|
||
# Backend storage specification, see Storage Types in the varnishd(5) | ||
# man page for details. | ||
VARNISH_STORAGE="file,/var/lib/varnish/varnish_storage.bin,1G" | ||
|
||
# Default TTL used when the backend does not specify one | ||
VARNISH_TTL=120 | ||
|
||
# User and group for the varnishd worker processes | ||
VARNISH_USER=varnish | ||
VARNISH_GROUP=varnish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[Unit] | ||
Description=Varnish a high-perfomance HTTP accelerator | ||
After=syslog.target network.target | ||
|
||
[Service] | ||
|
||
# | ||
# If you want to make changes to this file, please copy it to | ||
# /etc/systemd/system/varnish.service and make your changes there. | ||
# This will override the file kept at /lib/systemd/system/varnish.service | ||
# | ||
# Enviroment variables may be found in /etc/varnish/varnish.params | ||
# | ||
|
||
# Maximum number of open files (for ulimit -n) | ||
LimitNOFILE=131072 | ||
|
||
# Locked shared memory (for ulimit -l) | ||
# Default log size is 82MB + header | ||
LimitMEMLOCK=82000 | ||
|
||
# Maximum size of the corefile. | ||
LimitCORE=infinity | ||
|
||
EnvironmentFile=/etc/varnish/varnish.params | ||
|
||
Type=forking | ||
PIDFile=/var/run/varnish.pid | ||
PrivateTmp=true | ||
ExecStart=/usr/sbin/varnishd \ | ||
-P /var/run/varnish.pid \ | ||
-f $VARNISH_VCL_CONF \ | ||
-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ | ||
-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ | ||
-t $VARNISH_TTL \ | ||
-w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ | ||
-u $VARNISH_USER \ | ||
-g $VARNISH_GROUP \ | ||
-S $VARNISH_SECRET_FILE \ | ||
-s $VARNISH_STORAGE \ | ||
$DAEMON_OPTS | ||
|
||
ExecReload=/usr/sbin/varnish_reload_vcl | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Varnish HTTP accelerator logging daemon | ||
After=network.target | ||
|
||
[Service] | ||
Type=forking | ||
PIDFile=/run/varnishlog.pid | ||
ExecStart=/usr/bin/varnishlog -a -w /var/log/varnish/varnish.log -D -P /run/varnishlog.pid | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Varnish NCSA logging | ||
After=network.target | ||
|
||
[Service] | ||
Type=forking | ||
PIDFile=/run/varnishncsa.pid | ||
ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa.pid | ||
|
||
[Install] | ||
WantedBy=multi-user.target |