1

I have several vhosts setup, and would like to have the error logs go to pre-determined locations. The setup we have works great, except when I comment out error_log in httpd.conf I keep seeing "Starting httpd: (2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/error_log."

Is it possible to turn off the global error_log directive, and simply rely on the vhost ErrorLog? Or do you have to run both?


Edit 6.30.11

It appears the error_log in httpd.conf relates to the actual httpd daemon, and is not the same as a virtual host ErrorLog. For example, when I restart httpd I get messages like "[Thu Jun 30 17:18:56 2011] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations", and in my vhost ErrorLog I get messages such as "[Wed Jun 29 00:13:51 2011] [error] [client 173.255.252.120] File does not exist:"

So it seems you have to live with a setup like:

-rw-r--r-- 1 root webdev  329 Jun 30 17:18 global_error.log    
-rw-r--r-- 1 root webdev    0 Jun 30 17:18 example.com.access.log
-rw-r--r-- 1 root webdev    0 Jun 30 17:18 example.com.error.log
-rw-r--r-- 1 root webdev    0 Jun 30 17:18 example.com.rewrite.log

1 Answer 1

1

As mentioned in the edit, it does not appear that it is possible to disable the global_error log, which makes sense now, but didn't at the time.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.