create your own

VirtualHost Overlap on Port 80, or Port 443

64
rate or flag this page

By webchalk



Solution

When you install Apache in a development environment and in most production environments it works out of the box (so long as you understand the basic configuration). However sometimes things can go wrong, and here's a solution to help you overcome VirtualHost Overlap on Port Errors.

If you're getting a warning like:

[warn] _default_ virtualhost overlap on port 80, the first has precedence

When you start Apache, then all you need to do is add the following line to your Apache configuration file (usually httpd.conf)

NameVirtualHost *:80

What this does is allows name based virtual hosts and will accept any connections on port 80 unless a VirtualHost directive overrides the value further down in the configuration.

It's a problem that trips up a lot of developers, luckily it's an easy fix :)

In contrast if you're getting an error like this one:

[warn] _default_ virtualhost overlap on port 443, the first has precedence

It's likely that you've tried to setup some virtual hosts to run over SSL, and you need to include the matching directive to allow name based virtual hosts over that port:

NameVirtualHost *:443

I got these tips from the blog at antbrown.com, read more about virtualhost overlap on port.

Print   —   Rate it:  up  down  flag this hub

Comments

RSS for comments on this Hub

No comments yet.

Submit a Comment

Members and Guests

Sign in or sign up and post using a hubpages account.


optional


  • No HTML is allowed in comments, but URLs will be hyperlinked
  • Comments are not for promoting your hubs or other sites

working