If you need http/2 enabled at your CPanel server, you need to do few things:
1. Install nghttp2
cd /usr/src/
wget https://github.com/nghttp2/nghttp2/releases/download/v1.15.0/nghttp2-1.15.0.tar.gz
tar -xvzf nghttp2-1.15.0.tar.gz
cd nghttp2-1.15.0
./configure --prefix=/opt/nghttp2
make
make install
echo "/opt/nghttp2/lib" >> /etc/ld.so.conf.d/custom-libs.conf
ldconfig
Varnish installation on Centos server is very simple :
1. Installing varnish and packages:
mk /root/varnish
cd /root/varnish
wget http://repo.varnish-cache.org/redhat/varnish-3.0/el5/x86_64/varnish-3.0.3-1.el5.centos.x86_64.rpm
wget http://repo.varnish-cache.org/redhat/varnish-3.0/el5/x86_64/varnish-libs-3.0.3-1.el5.centos.x86_64.rpm
rpm -ivh *.rpm
yum install libedit -y
Note: Current installation for x86_64 system also if libedit was not found in your repo, do wollowing:
rpm -ivh http://mirror.chpc.utah.edu/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
I’ve tired from lags on my Centos server with CPanel. Apache was using a lot of RAM and limit visits by maxclients option was not good for my business, so I’ve decided to install Nginx caching server as proxy cacher for Apache server, instruction below:
1.1.1 For apache 2.2 login as root on your server and install mod_rpaf:
cd /root/
mkdir mod_rpaf
cd mod_rpaf/
wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz
tar xzf mod_rpaf-0.6.tar.gz
cd mod_rpaf-0.6
/usr/local/apache/bin/apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c
If link is not working download mod_rpaf here
This module will allow Apache get the correct IP address of users from Nginx. If this module is not installed, your access_log will be full of 127.0.0.1 visitors, and your statistic software will not recognize them…
1.1.2 Then you need to add this module into Apache config via WHM panel Main > Service Configuration > Apache Setup > Include Editor > Pre Main Include and add the following code: