Bug 73568 - NameVirtualHost * not working
Summary: NameVirtualHost * not working
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: httpd
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-06 05:10 UTC by Jef Spaleta
Modified: 2007-04-18 16:46 UTC (History)
0 users

Fixed In Version: 2.0.47-5
Clone Of:
Environment:
Last Closed: 2003-07-30 14:02:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Jef Spaleta 2002-09-06 05:10:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020809

Description of problem:
the config file directive to allow namevirtualhosting attached to all ethernet
connections isn't working anymore

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.
# Use name-based virtual hosting.
#   attached to all ethernet interfaces
NameVirtualHost *

2. create virtualhost attached to all interfaces
<VirtualHost * >
ServerAdmin hmmm
DocumentRoot /home/example/
    ServerName www.example.com
    ErrorLog logs/example-error_log
    CustomLog logs/example-access_log common
</virtualhost>

3. service httpd restart



Actual Results:  error message produced on the console

Starting httpd: [Fri Sep 06 00:58:41 2002] [error] VirtualHost _default_:443 --
mixing * ports and non-* ports with a NameVirtualHost address is not supported,
proceeding with undefined results

and the virtual hosting doesnt work

Expected Results:  This should work as outlined in the apache manual
http://localhost/manual/vhosts/name-based.html
<quote>
For example, suppose that both www.domain.tld and www.otherdomain.tld point at
an IP address that the server is listening to. Then you simply add the following
to httpd.conf:

    NameVirtualHost *

    <VirtualHost *>
    ServerName www.domain.tld
    DocumentRoot /www/domain
    </VirtualHost>

    <VirtualHost *>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain
    </VirtualHost>
</quote>

Additional info:

httpd-2.0.40-4 by the way.....


Looks like you MUSY add a port number to the NameVirtualHost directive
and the Virtualhost tags to get it to work.
NameVirtualHost *:80

    <VirtualHost *:80>
    ServerName www.domain.tld
    DocumentRoot /www/domain
    </VirtualHost>

    <VirtualHost *:80>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain
    </VirtualHost>

This seems to work...but the manual says I don't need to ports.
And as a matter of fact the previous version of httpd I installed via the beta
worked.

Comment 1 Hans Ecke 2002-10-17 19:44:42 UTC
Workaround: Remove the mod_ssl package. It's configuration file 
/etc/httpd/conf.d/ssl.conf (or something) contains a "VirtualHost 
_default_:443" entry. 
 
This is an example how the /etc/httpd/conf.d/ mechanism can lead to difficult 
to diagnose problems.....

Comment 2 Joe Orton 2003-07-30 14:02:10 UTC
This will be fixed for the next release by giving the example with the port:

#NameVirtualHost *:80

as suggested.  Thanks for the report.


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