Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VirtualHost Setup

Status
Not open for further replies.

PCSAARON

Programmer
Joined
Jul 9, 2002
Messages
131
Location
US
I am seting up a webserver. I have one domain working great with it. I want to add a second domain and point that domain to a specific directory within the first domain. I don't want to get rid of the DocumentRoot because there are php scripts that are using that directive. Is there a Directive that I need to put in the <VirtualHost> section for this? Thanks.

 
Would using:

DirectoryIndex /pages/newdomainhere/index.php

be ok for this? It seems to work, but I want to make sure that is the way to do it... Thanks.
 
PCSAARON,

You can set up different DocumentRoots for different virtual hosts.

<VirtualHost *>
ServerName domain1.com
DocumentRoot /path/to/domain1
</VirtualHost>

<VirtualHost *>
ServerName domain2.com
DocumentRoot /path/to/domain2
</VirtualHost>


Wishdiak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top