Install Varnish Cache To Speed Up Apache Performance

The varnish is a proxy and Cache or High-performance HTTP accelerator. Install Varnish Cache stores web pages in memory. So the webserver doesn’t have to create the same web page to the server again and again. Varnish Cache serves much faster than any application server. We can increase and install apache web server performance speed with varnish cache in Linux.

Check Out: Configure Varnish To Work With Apache

Install Varnish Cache To Speed Up Apache Performance:

Varnish Cache is a part of the Epel repository. So you must have installed the Epel repository on your machine. If you don’t install pygpgme, GPG, the verification won’t work.

Step 1: Install pygpgme package which allows you to handle GPG signatures, and yum-utils which contains the tool you need for installing source RPMs.

yum install pygpgme yum-utils -y

varnish install apache

Check Out: Mount ISO Image Linux In Vmware

Step 2: Install the Varnish

yum install varnish -y

Varnish-4.0.5-1 has been installed.

Step 3: Start the service and enable it for running at boot

systemctl start varnish && systemctl enable varnish

Check Version using varnish -V

apache speed with varnish

Step 4: Configuration of Varnish

Check Out: SElinux “ Semanage Command Not found “

The Varnish configuration files are located at /etc/varnish/ directory in CentOS 7. By default, Varnish listens on port 6081.

Now you will have to change it to 80 So website requests access the varnish first.

By default, Apache listen on Port 80, Edit this value in /etc/varnish/varnish.params

performance speed with varnish

Step 5: Now edit this file tells varnish to look for the server content. You can change IP address here

Check Out: Install LAMP (Linux, Apache, Mysql, PHP)

Save the file.

You’re done performance speed with varnish install cache apache 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