httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: 2 domain in the same root directory
Date Wed, 20 Mar 2002 14:14:15 GMT
Philippe wrote:
> 
> Hello,
> 
> I want to configure two domain on the same root directory with for each
> domain a home page.
> 
> I create for each domain a virtual host, but when i ask for a domain,
> it's always index.php who is call.
> In my config, I have indexdomain1.php and indexdomain2.php.
> 
> How can I config apache to serve the right index page for each domain ?
> I must have the same root because except the index page, the others
> pages are the same for both domains.

Create two virtualhosts, each with the same document root (as you have
already done, I think). But then, differentiate them using the
DirectoryIndex directive, i.e.

In VH1:
	ServerName     domain1
	DocumentRoot   /path/to/common-dir
	DirectoryIndex indexdomain1.php

in VH2:

	ServerName     domain2
	DocumentRoot   /path/to/common-dir
	DirectoryIndex indexdomain2.php

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


Mime
View raw message