Why do I get host IP in my Apache log?

Iolaire

Registered
For some time with both Jaguar and now Panther I go through phases where my own IP is in my Apache log file, rather than the person who is visiting my site. At time it switches back, often after I've opened httpd.conf and not changed much but saved it and restarted the server. I'm using the standard combined log format. My server is behind a SMC router.

Does anyone have any ideas of why this is happening?
Thanks,
iolaire
 
Don't hit me for asking the "did you plug it in" questions, but...

Are you sure that is not just YOU hitting your own site?

And are you sure you are not getting the remote host mixed up with something like the referrer?
 
Hmmm... I just stumbled across this in an OS X Server document:
With the performance cache disabled, the standard log format string on the CustomLog directive in httpd.conf remains the same as in earlier versions:

%h %l %u %t "%r" %>s %b

When the performance cache is enabled (default) the “%h” item will extract the local machine's IP addressTo extract the remote client's IP address, the log format string needs to be modified as follows:

%{PC-Remote-Addr}i %l %u %t "%r" %>s %b

When you use the Server Admin application to enable and disable web performance cache for each site (virtual host), the CustomLog directive in httpd.conf for each site is adjusted automatically so your access logs should always contain the correct remote client address.
Possibly that could be related to your issue.


(Sorry, but I closed my browser and I can't remember the URL of this PDF I'm reading...)
 
Thanks, I'll check that next time it switches back to my IP. I did re-set my router recently and that corresponded roughly to when it switched back to normal so the router could be the culprit also.

Personally I think what you found sounds like it may be the real answer. I should read that Server admin guide again, I read it before I got the base 10.1 a long time ago, it has good info even if you don't have the Server.
iolaire
 
Back
Top