Bug 53464 - httpd -t OKs config with syntax error
httpd -t OKs config with syntax error
Product: Red Hat Public Beta
Classification: Retired
Component: apache (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-09-09 18:06 EDT by bastiaan
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-09-09 18:07:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description bastiaan 2001-09-09 18:06:25 EDT
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:

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:

< #<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 18:07:36 EDT
Created attachment 31397 [details]
The problematic httpd.conf
Comment 2 Joe Orton 2001-11-23 12:04:37 EST
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.