From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010809 Description of problem: httpd -t says that the configuration is OK, but starting apache gives: Starting httpd: Syntax error on line 1442 of /etc/httpd/conf/httpd.conf: </VirtualHost> without matching <VirtualHost> section Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1.copy atached config to /etc/httpd/conf/httpd.conf 2.httpd -t 3.service httpd start Actual Results: httpd -t says: Syntax OK service httpd start says: Starting httpd: Syntax error on line 1442 of /etc/httpd/conf/httpd.conf: </VirtualHost> without matching <VirtualHost> section Expected Results: httpd -t should have complained Additional info: The diff between the attached config and the original is: 1280c1280 < #<VirtualHost _default_:443> --- > <VirtualHost _default_:443> I've left the priority to normal, even though it does not hinder operation of Apache, because it can be very annoying to have your http server die due to a missed syntax error.
Created attachment 31397 [details] The problematic httpd.conf
Hi. If the server is already runnning, you should use service httpd condrestart this will already check that the syntax is correct before restarting, so you shouldn't accidentally get a dead server from syntax errors. Running "httpd -t" doesn't pick up this error because the <IfDefine HAVE_SSL> section isn't evaluated. With the 1.3.22 package in Raw Hide you can use "apachectl configtest" to check for syntax errors at any time.