If you are using Cloudflare, your server will log Cloudflare IP address when visitors coming to your website. This problem can be solved by using mod_cloudflare for Apache server.
However, the method won’t work with LiteSpeed. Fortunately, LiteSpeed has a much simpler method to get the actual visitor’s IP address.
Use the following steps in order to obtain actual visitor’s IP address if you are using LiteSpeed & Cloudflare.
- Login to LiteSpeed Web Admin Panel
- Browse to Configuration → Server → General Settings
- Edit “Use Client IP in Header” to “Yes“
- Save & Start LiteSpeed Gracefully