How to enable non-error Apache log on MAMP
I found the answer here: https://documentation.mamp.info/en/MAMP-Mac/FAQ/#where-can-i-find-the-log-files
All log files are stored in: /Applications/MAMP/logs/
The logs need to be enabled on Apache.
In the file /Applications/MAMP/conf/apache/https.conf
find the lines
#CustomLog logs/access_log combined
Please uncomment this line by removing the '#', if you do it Apache will write the access logs into /Applications/MAMP/Library/logs/access_log
.
It may not be what you want, if you want to get the access logs in the same directory as the others logs (/Applications/MAMP/logs/
) use the absolute path to the file:
CustomLog /Applications/MAMP/logs/apache_access_log combined
combined
is a log format, that you can find on a line LogFormat
About logs, please note that you can also configure the error logs and the log level.
ErrorLog "/Applications/MAMP/logs/apache_error.log"
LogLevel error
After doing this, restart your MAMP Apache server.
I had success with adding this to the "Additional parameters for <VirtualHost>"
CustomLog "/Applications/MAMP/logs/mySiteName_access.log" combined