This tutorial will help you to enable Apache mod_cloudflare module on a Ubuntu system. Which will log the original visitor IP address to logs.
Install mod_cloudflare for Apache
Cloudflare provides an official module for the Apache server to capture real IP addresses. You need to enable the PPA of the Cloudflare module to your Ubuntu system.
Conclusion
In this tutorial, you have learned to configure the Cloudflare module to Apache on the Ubuntu system.