Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
b5ddc7ae
Commit
b5ddc7ae
authored
Mar 10, 2016
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update instructions on port change with systemd.
As suggested by Przemek Sobstel on github.
parent
76144099
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
putting_varnish_on_port_80.rst
doc/sphinx/tutorial/putting_varnish_on_port_80.rst
+23
-4
No files found.
doc/sphinx/tutorial/putting_varnish_on_port_80.rst
View file @
b5ddc7ae
...
@@ -9,10 +9,10 @@ First we stop varnish: ``service varnish stop``
...
@@ -9,10 +9,10 @@ First we stop varnish: ``service varnish stop``
Now we need to edit the configuration file that starts Varnish.
Now we need to edit the configuration file that starts Varnish.
Debian/Ubuntu
Debian/Ubuntu
(legacy)
~~~~~~~~~~~~~
~~~~~~~~~~~~~
~~~~~~~~~
On Debian/Ubuntu this is `/etc/default/varnish`. In the file you'll find
On
older
Debian/Ubuntu this is `/etc/default/varnish`. In the file you'll find
some text that looks like this::
some text that looks like this::
DAEMON_OPTS="-a :6081 \
DAEMON_OPTS="-a :6081 \
...
@@ -29,6 +29,26 @@ Change it to::
...
@@ -29,6 +29,26 @@ Change it to::
-S /etc/varnish/secret \
-S /etc/varnish/secret \
-s malloc,256m"
-s malloc,256m"
Debian (v8+) / Ubuntu (v15.04+)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On more recent Debian and Ubuntu systems this is configured in the systemd
service file.
Applying changes to the default service is best done by creating a new file
`/etc/systemd/system/varnish.service.d/customexec.conf`::
[Service]
ExecStart=
ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m
This will override the ExecStart part of the default configuration shipped
with Varnish Cache.
Run ``systemctl daemon-reload`` to make sure systemd picks up the new
configuration before restarting Varnish.
Red Hat Enterprise Linux / CentOS
Red Hat Enterprise Linux / CentOS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
@@ -42,4 +62,3 @@ Restarting Varnish again
...
@@ -42,4 +62,3 @@ Restarting Varnish again
Once the change is done, restart Varnish: ``service varnish start``.
Once the change is done, restart Varnish: ``service varnish start``.
Now everyone accessing your site will be accessing through Varnish.
Now everyone accessing your site will be accessing through Varnish.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment