httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <>
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


Owen Boyle.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message