httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yves Arsenault" <y...@carrefour.peicaps.org>
Subject RE: [users@httpd] Virtualhost question
Date Mon, 23 Jun 2003 13:26:51 GMT

Thanks for the reply,

My NameVirtualHost was not properly identified.

I also removed the ServerPath.

It works now.

Thanks again,

Yves Arsenault
Carrefour Infotech
5, Acadian Dr.
Charlottetown, PEI
C1C 1M2
yves@carrefour.peicaps.org
(902)368-1895 ext.242
ICQ #117650823

-----Original Message-----
From: Robert Andersson [mailto:robert@profundis.nu]
Sent: June 23, 2003 10:21 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Virtualhost question


Yves Arsenault wrote:
> But now when I type the new domain (site No2) in my browser, it points to
> site No1.
> Also, when I type in my server's IP address, I get site No1. When I should
> be getting my server's default webpage.

This is related. If you define a virtual host section, the first virtual
host becomes your "default server"; the main configuration only serves as
default settings for your virtual hosts. When Apache can't identify which
virtual host to serve from, it will serve from the first virtual host
specified in the configuration.

> This is what I have in my Vhosts.conf file..
> #domain1.com
> <VirtualHost ip>
> ServerName www.domain1.com
> ServerPath /www
> DocumentRoot /var/www/domain1.com/www
> </VirtualHost>
>
> #domain2.com
> <VirtualHost ip>
> ServerName www.domain2.com
> ServerPath /www
> DocumentRoot /var/www/domain2.com/www
> </VirtualHost>

I'm not sure you understand what ServerPath do, while setting it to the same
value for all hosts render it useless, so you should probably remove it.

I assume you are doing name-based virtual hosting. If so, do you have a
"NameVirtualHost <ip> or *" directive above the virtual host sections? And,
you should use an asterisk in the VirtualHost directives instead of the IP
address, unless you're doing an advanced setup.

Regards,
Robert Andersson


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


Mime
View raw message