1. Install the package¶
sudo yum -y install varnish
sudo systemctl enable varnish- To enable varnish to start on reboot
varnishd -V- Check version & installed correctly
2. Installing Magento Module¶
Switch to a new branch for the installation and download the relevant platform module.
3. Add Parameters on Daemon¶
Edit varnish daemon parameters -
DAEMON_OPTS="-p feature=+esi_ignore_other_elements -p cli_buffer=16384 -p vcc_allow_inline_c=on"
4. Lastly edit your Web Server (Apache/Nginx) configuration to use varnish.¶
varnishlog- Varnish Log, is
grepable so you can use commands like
varnishlog | grep Mobile(will show user-agents with mobile in name)
varnishhist- Varnish history will show a bar like graph using
|for hit varnish pages and
#for missed cached hits.
The full varnish log will give you an indication on what is happening at different stages. Cross-reference this with the
vcl file you are using with varnish.
- VCL_call HITAnything after this line until the next VCL_call will relate to the subroutine