Real Client IPs with Apache
Cachewall provides an Apache 2.2 and 2.4 shared module named xvarnish_module (mod_xvarnish) which is responsible for correcting visitor IP addresses, before they're handled by the web server. When mod_xvarnish is properly configured, the Apache configuration, .htaccess files, request logs, and CGI/PHP scripts will see correct client IPs.
The Apache module is configured automatically while installing and enabling Cachewall. Also, the Cachewall Healthcheck periodically inspects the Apache configuration to verify the module is loaded, just in case it's removed unexpectedly by EasyApache and friends.
Cachewall requires Apache's apxs tool to compile mod_xvarnish. This program is automatically installed by cPanel EasyApache 3, however, it has been found that EasyApache 4 does not include apxs by default. If you're using EasyApache 4, you'll need to install the cPanel RPM ea-apache24-devel for axps by running: yum install ea-apache24-devel
Get in touch with Cachewall support if you're facing any problems.
Configuring mod_xvarnish
To check on the status of mod_xvarnish, dump Apache's configured modules and check that xvarnish_module is listed:
httpd -M | grep xvarnish_module
If xvarnish_module is shown, it is properly configured. Otherwise, something is wrong and you should reconfigure it with:
xvctl enable mod_xvarnish --force
If xvctl fails for any reason, you can use the xvctl -v
option to enable verbose output for troubleshooting.