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


Here I am using the Fedora 9 for this example.

If you want to host many sites on one computer or machine.
I added following lines to httpd.conf file(end of file).

<VirtualHost  *:80>

Options +FollowSymLinks
ServerName example1.com
DocumentRoot /var/www/html/example1

</ VirtualHost>

<VirtualHost  *:80>

Options +FollowSymLinks
ServerName example2.com
DocumentRoot /var/www/html/example2

</ VirtualHost>

When I restarted the apache server using following command.
#su
#ROOT_PASSWORD
#/etc/init.d/httpd restart

I got the following error;
[warn] _default_ VirtualHost overlap on port 80, the first has precedence

Again I opend the httpd.conf tile and I read following lines;
#
# 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.
#

Than only I uncommented following line and restarted the Server.

NameVirtualHost *:80

My promlem get solved.

Ref URL: http://wpapi.com/solved-warn-_default_-virtualhost-overlap-on-port-80-the-first-has-precedence/

Advertisements
This entry was posted in PHP and tagged , , , by Purab Kharat. Bookmark the permalink.

About Purab Kharat

I am WordPress and Drupal Architect. I worked on many technologies like Ruby on Rails, Flex, PHP etc... I am Purab Kharat from India, Pune. I love to play chess and listen music and read books. I work in SY Smartsourcing Global Pvt Ltd in Princeton, NJ, USA. Now I am living at Plainsboro, 164 Hampshire Drive, Princeton Meadows, NJ. I have more then Ten years experience in Web Application Development (Specially in Php 5.0, Ruby on Rails, Mysql 5.0, RIA, Wordpress, Drupal, Joomla, Ecommerce)

4 thoughts on “solved: [warn] _default_ VirtualHost overlap on port 80, the first has precedence

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s