How to Configure Zpanel with Varnish Cache (with Pictures)
Edit Article

  • 1 Editor

This guide brings you easy steps on how to setup Varnish Cache so that it may run in front of the default web server of zPanel, Apache on either Ubuntu or CentOS. Just to jog your memory a little bit, Varnish Cache is great web accelerator software which makes it possible to cache the web content either on the server’s disk or RAM (this you can choose). This helps the web request be even delivered with minimal access to Apache as the backbend. This results in a decreased usage of CPU. Many people believe that Varnish is actually an awesome weapon to survive from Reddit and Digg effect. But the best is yet to come. The best thing about it is that its installation can be done side by side with a control panel like cPanel/WHM and also with zPanel too.


This article will tell you how to install and configure zPanel and run it Varnish Cache.

INSTALL zPANEL CP

Step-1:


The first step is to login to your server as root or as a use with root / sudo privileges.


Step-2:


The next step is to issue a command to install zPanelX CP.


For Ubuntu LTS: bash <(curl -Ss https://raw.github.com/zpanel/installers/master/install/Ubuntu-12_04/10_1_1.sh)


In case the above code does not work;


bash <(curl -Ss https://raw.githubusercontent.com/zpanel/installers/master/install/Ubuntu-12_04/10_1_1.sh) For CentOSbash <(curl -Ss https://raw.github.com/zpanel/installers/master/install/CentOS-6_4/10_1_1.sh)


In case the above code does not work;


bash <(curl -Ss [[1]]) Step-3:


Once the installation finishes you should be able to see the zPanel username. It should be zadmin and the password should also be zadmin.


Step-4:


You should now configure all and every basic setting and zPanel setup for your website. The least you can do is add a new website to the newly install zPanel.

CONFIGURE ZPANEL SETTINGS

Step-1:


The first thing is to open up your browser and from there you need to log in to the zPanel dashboard. You need to log in as zAdmin.


Step-2:


Now you need to go to the menu and from there Server admin > Module Admin > Apache Config.

1

Step-3:


You need to change the port on which Apache is set to work. It is usually set to port 80. Just change it according to your predefined setting of Varnish. I usually set it to 8080,

2

Step-4:


Now just scroll down a bit and just click on “Save Changes” button.


Step-5:


Once the changes are saved, you should login back into your server by using command line. Go to zPanel’s Apache configuration. If you using CentOS then it might be located at:


/etc/zpanel/configs/apache/

3

Step-6:


Now you need to open up your favorite text editor. Once opened, edit httpd-vhosts.conf file. I in this case will be using Nano.

4

Step-7:


Once done you’ll be able to see pretty clearly that all the default *:80 port will be replaced by *:8080 port. Along with this, all the virtual hosts entries of all your domains will be changed too. If that does not happen then simply restart Apache. Of somehow that does not work too then replace all the :80 with :8080.

5

Now save the changes and then just exit.


Step-8:


That is it. You are now all set. Just restart Apache and start the Varnish Cache:

6

Enjoy!!!

Article Tools

Did this article help you?

YesNo

Become
an Author!

Write an Article