Author Topic: [warn] _default_ VirtualHost overlap on port 80, the first has precedence  (Read 32481 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
If you get this error message while restarting apache:
Code: [Select]
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:
Code: [Select]
NameVirtualHost *:80
This fix will resolve an issue (if any) with all domains opening same website.


Sample configuration:
Code: [Select]
# 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>
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
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.

Offline
*
Re: [warn] _default_ VirtualHost overlap on port 80, the first has precedence
« Reply #2 on: November 05, 2014, 05:41:43 PM »
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!