How can I solve the apache2 httpd error "mixing * ports and non-* ports with a NameVirtualHost addre

Posted by rrc7cz on Server Fault See other posts from Server Fault or by rrc7cz
Published on 2009-10-21T14:41:29Z Indexed on 2010/05/21 11:51 UTC
Read the original article Hit count: 720

Filed under:
|

Here is the error I get when booting up Apache2:

 * Starting web server apache2
 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 [Wed Oct 21 16:37:26 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
 [Wed Oct 21 16:37:26 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
 [Wed Oct 21 16:37:26 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
 [Wed Oct 21 16:37:26 2009] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
 [Wed Oct 21 16:37:26 2009] [warn] NameVirtualHost *:80 has no VirtualHosts

I first followed this guide on setting up Apache to host multiple sites:

http://www.debian-administration.org/articles/412

I then found a similar question on ServerFault and tried applying the solution, but it didn't help.

Here is an example of my final VirtualHost config:

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName  www.xxx.com
    ServerAlias xxx.com

    # Indexes + Directory Root.
    DirectoryIndex index.html
    DocumentRoot /var/www/www.xxx.com

    # Logfiles
    ErrorLog  /var/www/www.xxx.com/logs/error.log
    CustomLog /var/www/www.xxx.com/logs/access.log combined
</VirtualHost>

with the domain X'd out to protect the innocent :-)

Also, I have the conf.d/virtual.conf file mentioned in the guide looking like this:

NameVirtualHost *

The odd thing is that everything appears to work fine for two of the three sites.

© Server Fault or respective owner

Related posts about apache2

Related posts about virtualhosts