[warn] _default_ VirtualHost overlap on port 80, the first has precedence

Started by Administrator, April 07, 2014, 08:00:10 PM

Previous topic - Next topic

Administrator

If you get this error message while restarting apache:
Starting httpd: [warn] _default_ VirtualHost overlap on port 80, the first has precedence

You can edit and set: /etc/httpd/conf/httpd.conf  NameVirtualHost to:
NameVirtualHost *:80

This fix will resolve an issue (if any) with all domains opening same website.


Sample configuration:
# My Virtual Hosts Config File for Two Domains
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin webmaster@theos.in
    DocumentRoot "/usr/local/docs/theos.in"
    ServerName www.theos.in
    ServerAlias theos.in
    ErrorLog "/var/log/theos.in-error_log"
    CustomLog "/var/log/theos.in-access_log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@nixcraft.com
    DocumentRoot "/usr/local/docs/nixcraft.com"
    ServerName www.nixcraft.com
    ServerAlias nixcraft.com
    ErrorLog "/var/log/nixcraft.com-error_log"
    CustomLog "/var/log/nixcraft.com-access_log" common
</VirtualHost>

logix

Version 0.8 does not appear to use this file as stated.
Instead it seems to be using /usr/local/apache/conf/httpd.conf and /usr/local/apache/conf.d/vhosts.conf instead.
While adding the line NameVirtualHost *:80 to either file solves the Topic error, it does not fix the problem that all virtual websites appear as the same one.

apmuthu

As of CWP v093 these settings can be done in the GUI - the Shared IP setting can be "*" and provides the global value of NameVirtualHost. The IP Address in the User details can also be "*" and will be the value for it's VirtualHost.

The Topic issue is solved but the webroot does not propagate to the VirtualHost sites!