Bug 53464 - httpd -t OKs config with syntax error
Summary: httpd -t OKs config with syntax error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: apache
Version: roswell
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-09 22:06 UTC by bastiaan
Modified: 2007-04-18 16:36 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-09-09 22:07:40 UTC
Embargoed:


Attachments (Terms of Use)
The problematic httpd.conf (49.66 KB, text/plain)
2001-09-09 22:07 UTC, bastiaan
no flags Details

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.



Note You need to log in before you can comment on or make changes to this bug.