Local IP instead of Real Visitor's IP on Apache Logs

Hello to everyone,
I have 3 servers locally and everyone has his own Virtualmin/Webin control panel and all three are connected in internet via a Microtik Router/Firewall. One of the server is online, public, with a website, and the others are for backup purposes. The one that is online has an public ip (217.xx.xx.xx) and a local one ( Everything is working fine but, (always is a BUT :slight_smile: ) when i tried to see the Apache Error Logs everywhere is shown the local IP as a visitor’s IP; and when i see Apache Access Logs, appears as Visitor’s access:

Example of Apache Error Log:

[Wed Nov 05 18:30:52 2014] [error] [client] Premature end of script headers

Example of Apache Access Log: - - [05/Nov/2014:19:42:24 +0100] "GET

Would someone help me on this issue, please?
Thank you!


How is traffic being passed from the internet to your system? Is your router/firewall doing NAT?

The issue your seeing with a local IP address being logged I’ve only seen when a reverse proxy application is between the internet and the web server.

More information about your setup please.


Hello there,
I’m reopening this thread since i have been facing the problem again and i need to show real ip’s now. Until now it was not really necessary but now it is.
Internet is coming firstly to a OpticalFiber Router that is passing the internet to a small Mikrotik and after that to a big switch that provides internet for the whole building. We have 2 dedicated IP’s and one of them is used for the online server.
Server specs is: Centos 6.7 , 32GM Ram, Octacore, 10/100 port, Lates Virtualmin/Webmin.
I have tried many ways to resolve it and i didn’t get it worked :frowning: Hope that someone can help me resolve this issue.
Thank you!

Hello to everyone,
Can someone help me on this issue? :frowning: