Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

LogFormat of access_log

Hi

I am using OS X 10.11.2 and Server 5.0.11.

My access_log in /var/log/apache2/ is always like "xxx aa.bb.cc.dd - - [26/Oct/2015:12:30:39 +0900] "GET ..."

even I accessed the server(xxx) from other macs. The xxx and IP are the hostname and IP of the server, not of the macs.

The access host might be wrong. I expect that the server and IP must be a hostname of macs and its IP.

LogFormat "%h....".


Thanks

Tac

iMac, OS X El Capitan (10.11.1)

Posted on Oct 29, 2015 12:46 AM

Reply
Question marked as Best reply

Posted on Dec 1, 2015 1:39 AM

It sounds like you have the apache caching proxy enabled - this used to be called the Performance Cache, but it may be different now. The proxy sits in front of Apache, intercepting incoming requests and only passing cache misses to Apache. Since Apache sees the connection from the proxy, which is running on the same box, the IP address it sees is the IP address of the server.


There are a couple of ways of getting around it, and it's been a while since I've played with it, but the simplest may be to disable the proxy. It doesn't serve a huge purpose for most people. If you do want/need the cache then you need to adjust the logging to include the X-Forwarded-For headers instead of the client IP.

2 replies
Question marked as Best reply

Dec 1, 2015 1:39 AM in response to situkak

It sounds like you have the apache caching proxy enabled - this used to be called the Performance Cache, but it may be different now. The proxy sits in front of Apache, intercepting incoming requests and only passing cache misses to Apache. Since Apache sees the connection from the proxy, which is running on the same box, the IP address it sees is the IP address of the server.


There are a couple of ways of getting around it, and it's been a while since I've played with it, but the simplest may be to disable the proxy. It doesn't serve a huge purpose for most people. If you do want/need the cache then you need to adjust the logging to include the X-Forwarded-For headers instead of the client IP.

LogFormat of access_log

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.