Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 73568 - NameVirtualHost * not working
NameVirtualHost * not working
Product: Red Hat Linux
Classification: Retired
Component: httpd (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2002-09-06 01:10 EDT by Jef Spaleta
Modified: 2007-04-18 12:46 EDT (History)
0 users

See Also:
Fixed In Version: 2.0.47-5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-07-30 10:02:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jef Spaleta 2002-09-06 01:10:00 EDT
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:

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

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

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
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 *>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain

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 *:80>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain

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
Comment 1 Hans Ecke 2002-10-17 15:44:42 EDT
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 10:02:10 EDT
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.