Edit this wiki!

2. English‎ > ‎1. MAMP‎ > ‎4. FAQ‎ > ‎Where can I find the logs?‎ > ‎

How can I enable the Apache HTTP access logs?

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

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

  3. #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.

  4. 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.

  5. CustomLog /Applications/MAMP/logs/apache_access_log combined

  6. Restart Apache using the MAMP widgit, or by executing this command on the command line:

  7. $ /Applications/MAMP/bin/apache2/bin/apachectl restart

  8. Now, view your new logfiles!

  9. $ tail -f /Applications/MAMP/logs/apache_access_log
    ::1 - - [04/Jun/2010:10:32:20 -0700] "GET /favicon.ico HTTP/1.1" 200 1406 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20100401 Firefox/3.6.3 GTB7.0"