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.
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: logs2/error_ log for server defined in main config file. logs2/access_ log for server defined in main config file. logs2/access_ log for server defined in /etc/httpd/ conf.d/ virtual. d/zimbra. conf. logs2/trac/ error_log for server defined in /etc/httpd/ conf.d/ virtual. d/trac. conf. logs2/trac/ access_ log for server defined in /etc/httpd/ conf.d/ virtual. d/trac. conf. logs2/error_ log for server defined in /etc/httpd/ conf.d/ virtual. d/test. conf. logs2/error_ log for server defined in /etc/httpd/ conf.d/ virtual. d/staging. conf. logs2/access_ log for server defined in /etc/httpd/ conf.d/ virtual. d/old.conf. logs2/access_ log for server defined in /etc/httpd/ conf/httpd. conf.
[root@kulma httpd]# /etc/init.d/httpd configtest
(2)No such file or directory: Could not open error log file /etc/httpd/
(2)No such file or directory: Could not open log file /etc/httpd/
(2)No such file or directory: Could not open log file /etc/httpd/
(2)No such file or directory: Could not open error log file /etc/httpd/
(2)No such file or directory: Could not open log file /etc/httpd/
(2)No such file or directory: Could not open error log file /etc/httpd/
(2)No such file or directory: Could not open error log file /etc/httpd/
(2)No such file or directory: Could not open log file /etc/httpd/
(2)No such file or directory: Could not open log file /etc/httpd/
Syntax OK
The patch is against 2.2.8, and is complete from my side.