Configure Varnish For Apache Web Server On CentOS 7

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.  

Configure Varnish For Apache Web Server:

you can improve your website performance by using this open-source cache software.

Check Out: Install Varnish Cache To Speed Up Apache Performance

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

Check Out: How To Change Grafana Server Default Port In Linux

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

varnish configuration file

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

varnish cache server

You’re done varnish configuration file varnish cache server varnish cache set file varnish cache server

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment