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

apache-logo


Virtual Host. A feature that enables Apache to configure multiple domain into one web (http) server. This feature saves the need to run multiple instances of web server and thus saves resources.


After configuring the <VirtualHost> directives, some may encounter an error message :

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


This is due to the missing of a parameter, before any <VirtualHost> directives:

NameVirtualHost


Solution :

add the parameter “NameVirtualHost” with the below suggested values :

NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /usr/local/www/apache22/data
</VirtualHost>


The “DocumentRoot” directive is to load the testing page that comes with apache. Unless the server is configure with only 1 domain name, it will be a good idea to load a testing or temporary page so that users are not slap with an browser error page instead.


Nemaste !!!

More post - related

Please sponsor my coffee if you find my posts worth reading, thanks!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*
-->
Improve the web with Nofollow Reciprocity.