Create Separate Apache Access Log for MAMP [HTTP] Hosts
1. Go to MAMP Pro -> Edit Template -> Apache-> httpd.conf.
2. In your httpd.conf configuration file, find the line with MAMP_VirtualHost_iteration_begin_MAMP.
3. Now, add a configuration directive for your access log file under the MAMP_VirtualHost_iteration_begin_MAMP. You must name your log file MAMP_VirtualHost_ServerName_MAMP.log In the example below, we use the following CustomLog directive.
Code: Select all
CustomLog "/Applications/MAMP/logs/MAMP_VirtualHost_ServerName_MAMP.log" "%t %v %h %l %u \"%r\" %>s %b \"%{User-Agent}i\""
4. Save and restart Apache.
Create Separate Apache Access Log for MAMP [HTTPS] Hosts
1. Go to MAMP Pro -> Edit Template -> Apache -> httpd-ssl.conf.
2. In your httpd-ssl.conf configuration file, find the line with MAMP_SSLVirtualHost_iteration_begin_MAMP.
3. Now, add a configuration directive for your access log file under the MAMP_SSLVirtualHost_iteration_begin_MAMP. You must name your log file MAMP_SSLVirtualHost_ServerName_MAMP.log In the example below, we use the following CustomLog directive.
Code: Select all
CustomLog "/Applications/MAMP/logs/MAMP_SSLVirtualHost_ServerName_MAMP.log" "%t %v %h %l %u \"%r\" %>s %b \"%{User-Agent}i\""