httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
Subject Re: Virtual Host Problems Pulling Hair Out
Date Thu, 24 Jan 2002 08:42:13 GMT
>  I have been working on this same problem for a 
> week now and cannot figure this out. I am new 
> to Linux and Apache. I normally get things 
> worked out on my own but this has me stumped. 
> Problem: I have 2 domain names that I am 
> wanting to host. The problem is that when I 
> type it in my browser 
>  it takes me to where it is 
> suppose to go.
> takes me to domain1 site.

Your httpd.conf is a bit too long to plough through at this time in the
morning but I saw enough to say that it has a few errors. In particular,
You only need one NameVirtualHost directive for the IP address which
serves your name-based VHs.

Re-arrange it to look more like this (assuming your NBVHs are on


  ServerName domain1
  DocumentRoot /path/to/domain1
  ServerName domain2
  DocumentRoot /path/to/domain2

If you are assigning NBVHs to a particular IP address, don't refer to it
outside of the VH containers (i.e. with server level directives). In
fact, once you start to use VHs, it is usually wiser to put all sites
inside VHs and do away with all server level DocumentRoot, ServerName
etc. directives.


Owen Boyle.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message