You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/06/27 14:01:45 UTC

DO NOT REPLY [Bug 39910] New: - default virtual host also matches name in

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39910>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39910

           Summary: default virtual host also matches name in <VirtualHost
                    "name">
           Product: Apache httpd-1.3
           Version: 1.3.33
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: uhlar@fantomas.sk


Hello,

according to discuttion in apache-users beginning at: 
http://mail-archives.apache.org/mod_mbox/httpd-users/200606.mbox/%3c20060626064242.GA11592@fantomas.sk%3e

it seems, that documentation does not completely reflect the name virtual
hosting behaviour of apache 1.3 (I got a report that 2.0 has the same
behaviour), or vice versa:

NameVirtualHost 195.168.3.66:80

<VirtualHost 195.168.3.66:80>
ServerName default.fantomas.sk
DocumentRoot /home/webs/default.fantomas.sk
</VirtualHost>

<VirtualHost 195.168.3.66:80>
ServerName fantomas.fantomas.sk
DocumentRoot /home/webs/fantomas.fantomas.sk
</VirtualHost>

<VirtualHost 195.168.3.66:80>
ServerName 195.168.3.66
DocumentRoot /home/webs/195.168.3.66
</VirtualHost>

According the documentation, requests for Host: 195.168.3.66 should fall in the
third virtual host (ServerName 195.168.3.66), while requests for all undefined
virtual hosts at IP 195.168.3.66  should go to first one. However it seems not
to be the case. I tried to request each virtual host once:

LogFormat "%{%s}t %v %V %{Host}o %{Host}i %a %h %>s %b %T %u \"%U\"
\"%{Referer}i\" \"%{User-Agent}i\"" testing

1151335141 default.fantomas.sk default.fantomas.sk - default.fantomas.sk
195.168.3.66 fantomas.fantomas.sk 200 20 4 - "/" "-" "-"
1151335149 default.fantomas.sk 195.168.3.66 - 195.168.3.66 195.168.3.66
fantomas.fantomas.sk 200 20 4 - "/" "-" "-"
1151335157 fantomas.fantomas.sk fantomas.fantomas.sk - fantomas.fantomas.sk
195.168.3.66 fantomas.fantomas.sk 200 21 5 - "/" "-" "-"

Defining <VirtualHost *:80> would cause the host to be defined on other
addresses, where I run different virtual hosts (and do not want to run this one).

(I've tried to solve this ticket in bug 11890 some time ago, but I had some
problems explaing it that time )

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39910] - default virtual host also matches name in

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39910>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39910


jim@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39910] - default virtual host also matches name in

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39910>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39910





------- Additional Comments From uhlar@fantomas.sk  2006-06-27 16:29 -------
This may be the answer:

http://httpd.apache.org/docs/1.3/vhosts/details.html

The complete list of names in the VirtualHost  directive are treated just like a
ServerAlias (but are not overridden by any ServerAlias statement) if all names
resolve to the same address set. Note that subsequent Port statements for this
vhost will not affect the ports assigned in the address set.

If so, I would like to have possibility to turn off this behaviour... should I
change severity to "Enhancement"?


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39910] - default virtual host also matches name in

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39910>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39910





------- Additional Comments From uhlar@fantomas.sk  2006-07-11 13:21 -------
according to
http://mail-archives.apache.org/mod_mbox/httpd-users/200606.mbox/%3cb61a4e530606291504m76c03fbeh40d2ad582abe359c@mail.gmail.com%3e
this is done, but I haven't seen the reason:
<CITE>
In the source, the
<VirtualHost> name is searched first (in order of appearance in conf
file) and returns a match before ServerName/Alias is even tried.
There is even a comment in the source stating that "If this is a
NameVirtualHost then we may not be doing the Right Thing".
</CITE>

Also, I found out a workaround that works - define hostname pointing to local IP
in /etc/hosts (not existing in DNS), and create virtual hosts on it. More at
http://mail-archives.apache.org/mod_mbox/httpd-users/200607.mbox/ajax/%3c20060711125407.GC8747@fantomas.sk%3e


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39910] - default virtual host also matches name in

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39910>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39910





------- Additional Comments From slive@apache.org  2006-06-27 15:21 -------
Incidentally, I've tested this in 2.0.55 and gotten similar results.  It is a
minor issue, since it only applies to people who want to treat requests for the
IP address differently from requests for "unmatched" names.  But at minimum, it
is not documented correctly.  A quick skim of the vhost matching code was not
enough to make me confident in fixing the documentation.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org