Configure Varnish For Apache Web Server
I have already installed Varnish On CentOS 7 with the Apache webserver. You can configure the Varnish cache server and varnish cache for apache. You need to do a varnish cache set file and also find the varnish configuration file.
This is a web application accelerator also known as caching HTTP reverse proxy. This is very fast and easy to configure in Linux.
you can improve your website performance by using this open-source cache software.
By default, Apache listens on port 80. In the previous article, I have configured Varnish to get content on Port 8080.
Step 1: So you need to change the Apache port to 8080 in /etc/httpd/conf/httpd.conf
Changed Listen 80 to Listen 8080
Step 2: Restart the Apache and Varnish Service
systemctl restart httpd && systemctl restart varnish
Check Out: Install Memcached
Step 3: Now verify Varnish & Apache working together.
curl -I http://192.168.185.143
This is my Apache Server IP which I have changed in /etc/varnish/default.vcl
Check Out: How To Hide Apache Server Name
The output should be looks like
You’re done varnish configuration file varnish cache server varnish cache set file varnish cache server