MacOS – Where is the httpd error log file on Lion

apachemacos

I'm running a local web (development) server on my mac with apache installed.

I'm sure it depends on my apache config but basically I just want to run tail -f /var/log/httpd-error.log in a terminal so I can see the error and warnings that occur during the development of my websites.

So my question is where or how do I find where this log file is placed since it is not placed in /var/log/

Best Answer

As morth pointed out, for the default Mac OS X Apache installation these are located in: /var/log/apache2/error_log.

The location can be changed in the httpd config using the ErrorLog directive, even for individual virtual hosts. Also note that if you installed another Apache besides the built-in one (like through MacPorts, or MAMP), this probably is different for you too. In that case you should have a look at the httpd.conf or equivalent for your installation.

tip: If you have Growl installed, also have a look at this 'growltail' script. I think it's great to get notified of errors while developing, without having the need to switch back to the Terminal all the time.