Access Log reports all visitors as from 127.0.0.1

Even Googlebot and Bingbot has the IP address 127.0.0.1 in Apache Access Log

Does anyone know how to fix this problem, which occurs in both OS X Server 5.0.3 and 5.0.4 after updating from 5.0.2?

Mac mini, OS X Server, 5.0.4 (Build 15S2259)

Posted on Sep 25, 2015 10:54 AM

Reply
27 replies

Sep 27, 2015 10:18 PM in response to PeterKjeldsen

This may be an oversight. Please be sure to file a bug report so Apple can fix this. In the mean time...


You need to open up your custom sites conf files in /Library/Server/Web/Config/apache2/sites/ and change this line:

CustomLog /var/log/apache2/access_log combinedvhost

to:

CustomLog /var/log/apache2/access_log combinedvhostproxy


Keep in mind your custom sites conf files is generated by the Server app and can/will be overwritten whenever you change the web sites' settings.


You can look at service_proxy_access.log instead if you don't want to muck around with conf files. 😝

Oct 23, 2015 1:13 PM in response to scottl31

You don't need to do anything specific to view the file service_proxy_access.log, which is located in /var/log/apache2/


How to find it if you don't use terminal:


1. Click on Finder

2. Go to the Go menu

3. Click on Go to folder...

4. Type /var/log/apache2/ in the text field and click on the Go button

5. Left click on the file service_proxy_access.log

6. Click on Open with...

7. Select TextEdit (or better TextWrangler if you have it installed on your machine)


Now, I found it better to edit the conf files so they could be shown using the Server app.


However, if you have updated to Server 5.0.15 you should read Access Log reports all visitors as from 127.0.0.1 or - - which deals with the new problems the update introduced.

Oct 23, 2015 1:28 PM in response to PeterKjeldsen

I'm still at 5.0.3. Been afraid to go further since this log IP thing seems to be the only thing I can find that went wrong.


Anyway, I thought you were editing service_proxy_access.log, but are you saying this is just the log to look at and see the correct IPs?


My folder at /Library/Server/Web/Config/apache2/sites/ has 62 files in it. Do I have to do the edit to all of them? It seems that the ones I have opened have both of the lines you mentioned changing one to the other, like :


CustomLog "/var/log/apache2/access_log" combinedvhost env=!forwarded

CustomLog "/var/log/apache2/access_log" combinedvhostproxy env=forwarded

Oct 23, 2015 1:43 PM in response to scottl31

You should only edit the files for the sites that has the ending .conf and you only need to change line 6 from:


CustomLog /var/log/apache2/access_log combinedvhost


to


CustomLog /var/log/apache2/access_log combinedvhostproxy


You can do a copy and paste job once you have done one and it should work after you have restarted the web service.


When you have done that and you update, you should follow the other description to fix the new log problem in the latest version (5.0.15).

Oct 23, 2015 2:24 PM in response to scottl31

If you update to Server 5.0.15, you may also want to read the ReadMe file located at /Library/Server/Web/Config/apache2/ReadMe.txt.

There are some additional information at the end regarding the new (Server app 5.x) proxy architecture.


It appears that the Server team enabled the combinedvhostproxy log format by default. It is likely you will not need to edit the conf files in /Library/Server/Web/Config/apache2/sites/ after all. You will just need to edit Server app's conf file - see the thread PeterKjeldsen linked to above.

Oct 23, 2015 2:57 PM in response to scottl31

Without knowing what your setup is and how mission critical it is, it's hard to say if you should update. Keep in mind that there are also a bunch of security updates bundled in the 5.0.15 update. So from that standpoint, yes, you should update. Along with OS X 10.11.1. Given you are already on 5.x, and is on the new proxy architecture, and everything is working, the update will likely be painless. [knock on wood]


Reminder: Backup first.

Oct 23, 2015 4:23 PM in response to scottl31

"Better" or "worst" is subjective. It all depends on what you are used to or (dis)like or expect. You won't notice much differences since you are running it in a server environment. As long as you are not installing any *nix packages from source, you shouldn't run into any issues with the new "Rootless" feature. Everything should work as it did before.


If you do update to Server 5.0.15, you will still need to edit Server's http config file if you want to see visitor ip-addresses in the access_log. Or you may use the service_proxy_access.log instead, in which case, no editing necessary. Until Apple corrects the issue, that is.

Oct 24, 2015 3:23 AM in response to scottl31

We don't use the wikis since the updates from snow leopard to lion showed that Apple could not be trusted anymore. Our setup is only using very few services in the server. The server app has become a laughing stock, one version had webmail the next did not, another version had GD library the next had it removed and all custom scripts had to be redone etc.


The IP problem in the log files is really minor to the nagging suspicion if everything else is ok. If you're running mission critical/life and death stuff I would consider OS X an unreliable platform. Not because of crashes or freezing up, but because of Apple's flip flop attitude to updates and new versions that does not support previous functionality.


Wether El Capitan is better than Yosemite I don't know yet because I always wait 4-5 months and sometimes longer for Apple to weed out the worst problems after the release, before I install it. Anyway our OS X Mac mini server (past EOL but maintained) is only used to run the server app so the only criteria here in dependability and security, so for the server app I update quickly with each version released for security reasons.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Access Log reports all visitors as from 127.0.0.1

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