Get real IP-address in Apache log CentOS

Are you using CloudFlare? Then you might have the issue that Apache registers the IP-address of the CloudFlare hosting platform instead of the IP-address of the visitor.

In that case you have to enable the mod_cloudflare Apache module. You can do this by running:

yum -y install libtool httpd-devel
cd /root/
git clone && cd mod_cloudflare
apxs -a -i -c mod_cloudflare.c
chmod 755 /usr/lib64/httpd/modules/

service httpd restart && httpd -M|grep cloudflare

Redirecting to /bin/systemctl restart httpd.service
 cloudflare_module (shared)