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: