https://issues.apache.org/bugzilla/show_bug.cgi?id=53334
Priority: P2
Bug ID: 53334
Assignee: [email protected]
Summary: non * name-based vhosts sometimes short-circut
ServerName/ServerAlias
Severity: normal
Classification: Unclassified
OS: Linux
Reporter: [email protected]
Hardware: PC
Status: NEW
Version: 2.5-HEAD
Component: Documentation
Product: Apache httpd-2
when you use name-based vhosting and a non-wildcard host/ip argument to
<virtualhost>, httpd will accept the first match between the incoming Host
header and the verbatim individual host/ip arguments to <virtualhost> without
ever checking ServerName/ServerAlias.
This never happens with * because the request hostname can't match *.
<virtualhost 1.2.3.4:80>
ServerName www.example.com
</virtualhost>
<virtualhost 1.2.3.4:80>
ServerName other.example.com
ServerAlias 1.2.3.4
</virtualhost>
but http://1.2.3.4/ will route to the first vhost, not because it's the default
but because 1.2.3.4 is in [one of] the args to <virtualhost>.
AFAICT what it's trying to tolerate is:
host1.example.com=1.2.3.4
host2.example.com=1.2.3.4
NameVirtualHost 1.2.3.4
<virtualhost host1.example.com>
</virtualhost>
<virtualhost host2.example.com>
</virtualhost>
(this actually works w/o servername, but as a thought experiment consider
ServerName host1.example.com (yes, host1) in the 2nd VH will not do anything)
-/-
Anyway, the vhost resolution should warn of this -- if the arg you used in
<vh> matches the requested hostname before a servername/serveralias is matched,
it will be used instead.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]