1. mampsupportmod
  2. MAMP - Official Guides
  3. Friday, 25 January 2019

In order to create separate Apache access log or error log files per virtual host, you need to create a MAMP Virtual Host Iteration per HTTPD conf file. Follow the steps below.

 

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.

 

CustomLog "/Applications/MAMP/logs/MAMP_VirtualHost_ServerName_MAMP.log" "%t %v %h %l %u \"%r\" %>s %b \"%{User-Agent}i\""

 

mamp pro accesslog per virtual host httpd

 

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.

 

CustomLog "/Applications/MAMP/logs/MAMP_SSLVirtualHost_ServerName_MAMP.log" "%t %v %h %l %u \"%r\" %>s %b \"%{User-Agent}i\""

 

mamp pro accesslog per virtual host httpd ssl

 

4. Save and restart Apache.





There are no replies made for this post yet.
However, you are not allowed to reply to this post.