When restarting Apache (or httpd service) if you get the following Apache error: [warn] default VirtualHost overlap on port 80, the first has precedence on Linux (CentOS, Ubuntu, Fedora, etc) chances are you are configuring vhosts or adding additional virtual hosts to your Apache config.
You are probably seeing an error similar to the following:
1 2 3 |
|
Fix Apache Error: [warn] default VirtualHost overlap on port 80, the first has precedence
To fix the Apache error message [warn] default VirtualHost overlap on port 80, the first has precedence Apache you need to open the file httpd.conf file in Vi and add the following line:
1
|
|
Add the following:
1
|
|
You then need to configure your vhosts as follows:
1 2 3 4 5 6 7 8 9 |
|
*note the :80 – this means it will run on any IP address configure on your server.
If you need to run the vhost on a specific IP address use the following:
1
|
|
Obvious replace the IP with your servers IP address, you also need to reconfigure your vhost files to use the IP address.
If you restart Apache / Httpd you should now see:
1 2 |
|
Your formatting may differ the above was taken from a CentOS Apache restart, your may fine this Centos install Apache guide useful.
The Apache error message [warn] default VirtualHost overlap on port 80, the first has precedence should now be sucsessfully fixed.