You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Milhomem, Marcus" <Ma...@bmc.com> on 2002/12/20 17:57:12 UTC
[users@httpd] Adding Virtual Host to Apache 2
Hi all,
I have a apache server that was running ok, with the out of the box
configuration of apache 2, I mean, without virtual hosts. But now, my
machine will host another domain, so I have to add a virtual host to my
httpd.conf. So now I have my domain www.aaa.com.br and a virtual host
www.bbb.com.br. But after I configured my virtual host, dosen´t matter if I
type www.aaa.com.br or www.bbb.com.br, it always shows the virtual host´s
homepage. I inserted the following config on my httpd.conf, what I did
wrong?
NameVirtualHost *
<VirtualHost 192.168.2.2>
DocumentRoot /www/htdocs/bbb
ServerName www.bbb.com.br
</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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Adding Virtual Host to Apache 2
Posted by "J. Greenlees" <ja...@shaw.ca>.
Milhomem, Marcus wrote:
> Hi all,
> I have a apache server that was running ok, with the out of the box
> configuration of apache 2, I mean, without virtual hosts. But now, my
> machine will host another domain, so I have to add a virtual host to my
> httpd.conf. So now I have my domain www.aaa.com.br and a virtual host
> www.bbb.com.br. But after I configured my virtual host, dosen´t matter if I
> type www.aaa.com.br or www.bbb.com.br, it always shows the virtual host´s
> homepage. I inserted the following config on my httpd.conf, what I did
> wrong?
>
>
>
> NameVirtualHost *
>
> <VirtualHost 192.168.2.2>
> DocumentRoot /www/htdocs/bbb
> ServerName www.bbb.com.br
> </VirtualHost>
>
try:
NameVirtualHost *:80
as oded put it that is the recommended if you are not mixing named and
ip based virtual hosts.
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org