Has anyone successfully installed Varnish 7 on CWP yet?
I've tried a couple of times now but still get 503 when testing. Has anyone figured out the correct changes for the varnish.service file?
Yes.
You already install it?
After install, you need to change the line in file '/usr/lib/systemd/system/varnish.service' of default installation, from:
ExecStart=/usr/sbin/varnishd -a :6081 -f /etc/varnish/default.vcl -s malloc,256m
to:
ExecStart=/usr/sbin/varnishd -a :82 -f /etc/varnish/default.vcl -s malloc,256m
After that, run:
# systemctl daemon-reload
I ended up getting it running but at least in v7.7 it's slightly different
Here is the original varnish.service file
ExecStart=/usr/sbin/varnishd \
-a :6081 \
-a localhost:8443,PROXY \
-f /etc/varnish/default.vcl \
-P %t/%N/varnishd.pid \
-p feature=+http2 \
-s malloc,256m
it seems if you change it as below it works (changing the port to 82 and proxy port to 8444 - conflicts with httpd on 8443)
ExecStart=/usr/sbin/varnishd \
-a :82 \
-a localhost:8444,PROXY \
-f /etc/varnish/default.vcl \
-P %t/%N/varnishd.pid \
-p feature=+http2 \
-s malloc,256m
then run
systemctl daemon-reload
systemctl enable varnish
systemctl status varnish
After confirmed running you need to go to CWP and rebuild the webservers in CWP in order to generate the conf files.
Thanks again to Netino for pointing this out!