Bug 60974 - Syntax checks returns OK on unsyntactical configuration file
Summary: Syntax checks returns OK on unsyntactical configuration file
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Runtime Config (show other bugs)
Version: 2.4.25
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-12 09:42 UTC by Rob de Wit
Modified: 2017-04-12 09:43 UTC (History)
1 user (show)



Attachments
Test script setting up test environment and showing bug. (1.61 KB, application/x-shellscript)
2017-04-12 09:42 UTC, Rob de Wit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob de Wit 2017-04-12 09:42:01 UTC
Created attachment 34907 [details]
Test script setting up test environment and showing bug.

If a virtual host contains more than one ServerName, only the first one is used. Syntax checks returns 'OK', although thies yields to unexpected results as the httpd will choose the last virtual host for that IP:port.

I've attached a test script showing the problem. It sets up two virtual hosts with the first one containing both a ServerName directive for alice.example.com and a ServerName directive for bob.example.com. A second virtual host contains just one ServerName directive for carol.example.com. 


My output is:

Setup test environment
Server version
Server version: Apache/2.4.25 (Unix)
Check syntax
Syntax OK
Start test httpd
Run test
Test alice...OK
Test bob...FAILED (alice)
Test carol...OK
Stopping test httpd


I would expect that either the first virtual host also respond to bob.example.com or that the syntax checks fails.