Bug 53464

Summary: httpd -t OKs config with syntax error
Product: [Retired] Red Hat Public Beta Reporter: bastiaan
Component: apacheAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: roswell   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-09-09 22:07:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
The problematic httpd.conf none

Description bastiaan 2001-09-09 22:06:25 UTC
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.

Comment 1 bastiaan 2001-09-09 22:07:36 UTC
Created attachment 31397 [details]
The problematic httpd.conf

Comment 2 Joe Orton 2001-11-23 17:04:37 UTC
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.