Comment 11 for bug 936216

Revision history for this message
In , Davidf-a (davidf-a) wrote :

Created attachment 23281
Checks error logs and custom logs with relative paths for the main host and virtual hosts

Adjusted patch to address the problems above: it now iterates over the virtual hosts, and relative paths are used too.

It also checks whether the error log is even defined, and adjusts the language to indicate which config file it is looking at.

Sample output:
[root@kulma httpd]# /etc/init.d/httpd configtest
(2)No such file or directory: Could not open error log file /etc/httpd/logs2/error_log for server defined in main config file.
(2)No such file or directory: Could not open log file /etc/httpd/logs2/access_log for server defined in main config file.
(2)No such file or directory: Could not open log file /etc/httpd/logs2/access_log for server defined in /etc/httpd/conf.d/virtual.d/zimbra.conf.
(2)No such file or directory: Could not open error log file /etc/httpd/logs2/trac/error_log for server defined in /etc/httpd/conf.d/virtual.d/trac.conf.
(2)No such file or directory: Could not open log file /etc/httpd/logs2/trac/access_log for server defined in /etc/httpd/conf.d/virtual.d/trac.conf.
(2)No such file or directory: Could not open error log file /etc/httpd/logs2/error_log for server defined in /etc/httpd/conf.d/virtual.d/test.conf.
(2)No such file or directory: Could not open error log file /etc/httpd/logs2/error_log for server defined in /etc/httpd/conf.d/virtual.d/staging.conf.
(2)No such file or directory: Could not open log file /etc/httpd/logs2/access_log for server defined in /etc/httpd/conf.d/virtual.d/old.conf.
(2)No such file or directory: Could not open log file /etc/httpd/logs2/access_log for server defined in /etc/httpd/conf/httpd.conf.
Syntax OK

The patch is against 2.2.8, and is complete from my side.