The plugin isn't supported anymore, no, which is a bummer as I know a lot of people used it, that wasn't our decision though, it was theirs.
As far as enabling mod_remoteip for CloudFlare the instructions are indeed different than what they provide. I do miss the ease of their instructions for mod_cloudflare.
So, I believe the following should work (only including relevant steps):
Using
Modify Apache Virtual Hosts with Include Files | cPanel & WHM Documentation
Apply to all virtual hosts on the system
- With and without SSL - /etc/apache2/conf.d/userdata/includename.conf
Alternatively you could modify the includes here:
- With SSL
- /etc/apache2/conf.d/userdata/ssl/2_4/includename.conf
- /etc/apache2/conf.d/userdata/ssl/includename.conf
- Without SSL
- /etc/apache2/conf.d/userdata/std/2_4/includename.conf
- /etc/apache2/conf.d/userdata/std/includename.conf
You'll add the following line:
RemoteIPHeader CF-Connecting-IP
- After you create or edit an Apache include userdata file, you must rebuild the httpd.conf file and restart Apache for the changes to take effect.
- To rebuild the httpd.conf file, run the following script:
Code:
/usr/local/cpanel/scripts/rebuildhttpdconf
- To restart Apache, run the following script:
Code:
/usr/local/cpanel/scripts/restartsrv_httpd
- This can be done at WHM>>Service Configuration>>Apache Configuration>>Global Configuration:
- LogFormat (combined)
- Default is:
%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
- LogFormat (common)
- Default is:
%h %l %u %t \"%r\" %>s %b
- Note that all you're going to do is replace
%h
with %a
so it should look like the following:
- LogFormat (combined)
Code:
%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
- LogFormat (common)
Code:
%a %l %u %t \"%r\" %>s %b
- Ensure you click the checkbox for the customized version then click Save at the bottom of the page
- A prompt will appear telling you what's been saved, confirm everything is as it should be
- Select Rebuild Configuration and Restart Apache at the bottom of the page
- This can be done through WHM>>Service Configuration>>Apache Configuration>>Include Editor -> Pre Main Include
- Select All Versions
- Add the following:
Code:
<IfModule mod_remoteip.c>
RemoteIPHeader CF-Connecting-IP
RemoteIPTrustedProxy 173.245.48.0/20
RemoteIPTrustedProxy 103.21.244.0/22
RemoteIPTrustedProxy 103.22.200.0/22
RemoteIPTrustedProxy 103.31.4.0/22
RemoteIPTrustedProxy 141.101.64.0/18
RemoteIPTrustedProxy 108.162.192.0/18
RemoteIPTrustedProxy 190.93.240.0/20
RemoteIPTrustedProxy 188.114.96.0/20
RemoteIPTrustedProxy 197.234.240.0/22
RemoteIPTrustedProxy 198.41.128.0/17
RemoteIPTrustedProxy 162.158.0.0/15
RemoteIPTrustedProxy 104.16.0.0/12
RemoteIPTrustedProxy 172.64.0.0/13
RemoteIPTrustedProxy 131.0.72.0/22
RemoteIPTrustedProxy 2400:cb00::/32
RemoteIPTrustedProxy 2606:4700::/32
RemoteIPTrustedProxy 2803:f800::/32
RemoteIPTrustedProxy 2405:b500::/32
RemoteIPTrustedProxy 2405:8100::/32
RemoteIPTrustedProxy 2a06:98c0::/29
RemoteIPTrustedProxy 2c0f:f248::/32
</IfModule>
- Click Update
- Click Restart Apache
And that should be it!
I tried to keep you off the command line as much as I could and make this as straight forward as possible. Let me know if there are any issues with this though.