How to Fix _default_ VirtualHost overlap on port 80, the first has precedence

Question :
I running wordpress blog on apache web server on Virtual private server (VPS). I had the problem when i restarted the httpd service on my VPS. This error came after i setup multiple domain on my httpd config file, meaning i used more than one VirtualHost on httpd.conf :

[root@vps ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd: [Thu May 01 00:01:03 2014] [warn] _default_ VirtualHost overlap on port 80, the first has precedence
                                                           [  OK  ]

Solution :

After a few hours troubleshooting and googling to internet, i managed to fix the issue. When we decide to run multiple domain in one web server or web hosting world called it shared hosting service, you need to configure name-based virtual hosts on your apache httpd service. NameVirtualhost is require to be included in httpd.conf file as below :

..
..
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
..
..

Then restart the apache httpd. Issue resolved!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *