Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I enable non-error server logging on MAMP (or, am I totally blind, and is it already enabled by default?)

So far, I can only find the error logs for Apache, MySQL and PHP in /Applications/MAMP/logs. But I'd like to access the server log (ie, the rawest data that the server processes, all of the HTTP requests that it received/served, etc.)

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

I found the answer here: http://documentation.mamp.info/en/mamp/faq/where-can-i-find-the-logs/how-can-i-enable-the-apache-access-logs

The Apache HTTP Server access logs are disabled by default. To enable them, do the following:

Open the Apache HTTP configuration at /Applications/MAMP/conf/apache/httpd.conf Find this line.

#CustomLog logs/access_log combined

Note that if you simply enable this directive, Apache will write the access logs to /Applications/MAMP/Library/logs/access_log , which is probably not what you want. It is better to store the access_log to /Applications/MAMP/logs/ , which is where the MySQL logs, PHP logs and Apache error logs are kept.

Change the line to say the following. This will write your access logs to the default log directory, using the 'LogFormat' named 'combined'. This 'combined' log format follows some common conventions.

CustomLog /Applications/MAMP/logs/apache_access_log combined

After doing this, restart your MAMP Apache server.

share|improve this answer
add comment

All is explained at http://httpd.apache.org/docs/2.2/mod/mod_log_config.html Use LogFormat to define a format, CustomLog to define a location.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.