Configure logs in Apache for virtualhost

First of all, let’s distinguish between error logs and access logs.

In this guide you can see how:

But, I noticed that there was not info in the apache /var/log/apache2.access log

The trick is to add one line to the virtualhost that you would like to control:

CustomLog /var/log/apache/ combined


Apache logs in CentOS 6

If you need to know what is happening with your server, check-out the Apache logs here:


you will find somethint like this:




and so on

to see the logs in real time:

tail -f /etc/httpd/logs/access_log

this command f.e. will show you the access log that are currently happening in your site


Enabling Apache logs in MAMP Pro

MAMP Pro uses a template to configure the apache configuration file. So you have to open MAMP  Pro and open templates apache, as described here

Then change the lines as explained here

and restart apache!

You will now be able to see the logs in real time using
tail -f /Applications/MAMP/logs/apache_access.log