You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by BearBoy <be...@bearboy.com> on 2002/01/22 16:50:58 UTC

Virtual hosts

Ok... I've looked all over the place for something to tell
me whats happening here..

if anyone could give me a clue as to why this is happening
I'd appreciate it.

ittle:/etc/apache# /usr/sbin/apache start
[Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
overlaps with VirtualHost 192.168.1.2:80, the first has
precedence, perhaps you need a NameVirtualHost directive
[Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
overlaps with VirtualHost 192.168.1.2:80, the first has
precedence, perhaps you need a NameVirtualHost directive
[Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
overlaps with VirtualHost 192.168.1.2:80, the first has
precedence, perhaps you need a NameVirtualHost directive
[Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
overlaps with VirtualHost 192.168.1.2:80, the first has
precedence, perhaps you need a NameVirtualHost directive
[Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
overlaps with VirtualHost 192.168.1.2:80, the first has
precedence, perhaps you need a NameVirtualHost directive
[Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
www.bearboy.com:80 has no VirtualHosts
[Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
www.blahblah.net:80 has no VirtualHosts
[Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
www.buhau.com:80 has no VirtualHosts
[Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
www.raverbears.com:80 has no VirtualHosts
[Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
www.steevil.com:80 has no VirtualHosts
[Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
www.sccleather.org:80 has no VirtualHosts
[Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
www.sccleather.net:80 has no VirtualHosts
[Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
www.sccleather.com:80 has no VirtualHosts


## begin httpd.conf file

NameVirtualHost www.bearboy.com

NameVirtualHost www.bearboy.com
<VirtualHost www.bearboy.com>
ServerAdmin bearboy@bearboy.com
DocumentRoot /var/www/www.bearboy.com
ServerName www.bearboy.com
ServerAlias www.bearboy.com
ErrorLog /var/log/apache/bearboy.com-error.log
</VirtualHost>

NameVirtualHost www.blahblah.net
<VirtualHost www.blahblah.net>
ServerAdmin bearboy@bearboy.com
DocumentRoot /var/www/www.blahblah.net
ServerName www.blahblah.net
ServerAlias www.blahblah.net
ErrorLog /var/log/apache/blahblah.net-error.log
</VirtualHost>


NameVirtualHost www.buhau.com
<VirtualHost 192.168.1.2>
ServerAdmin bearboy@bearboy.com
DocumentRoot /var/www/www.buhau.com
ServerName www.buhau.com
ServerAlias www.buhau.com
ErrorLog /var/log/apache/buhau.com-error.log
</VirtualHost>

NameVirtualHost www.raverbears.com
<VirtualHost 192.168.1.2>
ServerAdmin bearboy@bearboy.com
DocumentRoot /var/www/www.raverbears.com
ServerName www.raverbears.com
ServerAlias www.raverbears.com
ErrorLog /var/log/apache/raverbears.com-error.log
</VirtualHost>

NameVirtualHost www.steevil.com
<VirtualHost 192.168.1.2>
ServerAdmin bearboy@bearboy.com
DocumentRoot /var/www/www.steevil.com
ServerName www.steevil.com
ServerAlias www.steevil.com
ErrorLog /var/log/apache/steevil.com-error.log
</VirtualHost>

NameVirtualhost www.sccleather.org
<VirtualHost 192.168.1.2>
ServerAdmin bearboy@bearboy.com
DocumentRoot /var/www/www.sccleather.org
ServerName www.sccleather.org
ServerAlias www.sccleather.org
ErrorLog /var/log/apache/sccleather.org-error.log
</VirtualHost>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Virtual hosts

Posted by Owen Boyle <ob...@bourse.ch>.
BearBoy wrote:
> 
> Ok... I've looked all over the place for something to tell
> me whats happening here..
> 
> if anyone could give me a clue as to why this is happening
> I'd appreciate it.
> 
> ittle:/etc/apache# /usr/sbin/apache start
> [Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
> overlaps with VirtualHost 192.168.1.2:80, the first has
> precedence, perhaps you need a NameVirtualHost directive
> [Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
> overlaps with VirtualHost 192.168.1.2:80, the first has
> precedence, perhaps you need a NameVirtualHost directive
> [Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
> overlaps with VirtualHost 192.168.1.2:80, the first has
> precedence, perhaps you need a NameVirtualHost directive
> [Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
> overlaps with VirtualHost 192.168.1.2:80, the first has
> precedence, perhaps you need a NameVirtualHost directive
> [Tue Jan 22 07:49:42 2002] [warn] VirtualHost 192.168.1.2:80
> overlaps with VirtualHost 192.168.1.2:80, the first has
> precedence, perhaps you need a NameVirtualHost directive
> [Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
> www.bearboy.com:80 has no VirtualHosts
> [Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
> www.blahblah.net:80 has no VirtualHosts
> [Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
> www.buhau.com:80 has no VirtualHosts
> [Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
> www.raverbears.com:80 has no VirtualHosts
> [Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
> www.steevil.com:80 has no VirtualHosts
> [Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
> www.sccleather.org:80 has no VirtualHosts
> [Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
> www.sccleather.net:80 has no VirtualHosts
> [Tue Jan 22 07:49:42 2002] [warn] NameVirtualHost
> www.sccleather.com:80 has no VirtualHosts
> 
> ## begin httpd.conf file
> 
> NameVirtualHost www.bearboy.com
> 
> NameVirtualHost www.bearboy.com
> <VirtualHost www.bearboy.com>
> ServerAdmin bearboy@bearboy.com
> DocumentRoot /var/www/www.bearboy.com
> ServerName www.bearboy.com
> ServerAlias www.bearboy.com
> ErrorLog /var/log/apache/bearboy.com-error.log
> </VirtualHost>
> 
> NameVirtualHost www.blahblah.net
> <VirtualHost www.blahblah.net>
> ServerAdmin bearboy@bearboy.com
> DocumentRoot /var/www/www.blahblah.net
> ServerName www.blahblah.net
> ServerAlias www.blahblah.net
> ErrorLog /var/log/apache/blahblah.net-error.log
> </VirtualHost>
> 
> NameVirtualHost www.buhau.com
> <VirtualHost 192.168.1.2>
> ServerAdmin bearboy@bearboy.com
> DocumentRoot /var/www/www.buhau.com
> ServerName www.buhau.com
> ServerAlias www.buhau.com
> ErrorLog /var/log/apache/buhau.com-error.log
> </VirtualHost>
> 
> NameVirtualHost www.raverbears.com
> <VirtualHost 192.168.1.2>
> ServerAdmin bearboy@bearboy.com
> DocumentRoot /var/www/www.raverbears.com
> ServerName www.raverbears.com
> ServerAlias www.raverbears.com
> ErrorLog /var/log/apache/raverbears.com-error.log
> </VirtualHost>
> 
> NameVirtualHost www.steevil.com
> <VirtualHost 192.168.1.2>
> ServerAdmin bearboy@bearboy.com
> DocumentRoot /var/www/www.steevil.com
> ServerName www.steevil.com
> ServerAlias www.steevil.com
> ErrorLog /var/log/apache/steevil.com-error.log
> </VirtualHost>
> 
> NameVirtualhost www.sccleather.org
> <VirtualHost 192.168.1.2>
> ServerAdmin bearboy@bearboy.com
> DocumentRoot /var/www/www.sccleather.org
> ServerName www.sccleather.org
> ServerAlias www.sccleather.org
> ErrorLog /var/log/apache/sccleather.org-error.log
> </VirtualHost>

You seem to be under the impression you need more than one
NameVirtualhost directive. You don't.

All you need is:

NameVirtualHost <ip-address>

<all the VHs with no more NameVirtualHost directives>

rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Virtual hosts

Posted by BearBoy <be...@bearboy.com>.
THANK YOU!

I was sure it was something simple.. works like a charm
now.. thanks for your guys help!

Dan



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Virtual hosts

Posted by Joshua Slive <jo...@slive.ca>.
> From: BearBoy [mailto:bearboy@bearboy.com]

> Ok... I've looked all over the place for something to tell
> me whats happening here..
> NameVirtualHost www.bearboy.com
>
> NameVirtualHost www.bearboy.com
> <VirtualHost www.bearboy.com>
> ServerAdmin bearboy@bearboy.com
> DocumentRoot /var/www/www.bearboy.com
> ServerName www.bearboy.com
> ServerAlias www.bearboy.com
> ErrorLog /var/log/apache/bearboy.com-error.log
> </VirtualHost>

Start by reading this:
http://httpd.apache.org/docs/vhosts/name-based.html

There you will see that you need one NameVirtualHost for each IP address
that you are hosting, not for each domain name.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org