Apache Server configuration support - multiple site directories?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > October 2005 > multiple site directories?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author multiple site directories?
Joe

2005-10-25, 8:50 pm

I'm running Apache (and wamp) and I would like to run more than one site for
local testing. Right now I rename my htdocs directory and create another
then add the site files of the one I want to test into that one. How can I
run two concurrent sites and easily switch back and forth? Is this possible?


Davide Bianchi

2005-10-26, 2:50 am

On 2005-10-25, Joe <adfwe@joe.blo> wrote:
> I'm running Apache (and wamp) and I would like to run more than one site for
> local testing.


Enable and use Virtual Hosts, see the documentation about VHosts on
the Apache web site. In a pinch:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName ...thenamehere...
DocumentRoot ...wherever...
...otherdirectives...
</VirtualHost>

<VirtualHost *:80>
ServerName ...anothername...
...

</VirtualHost>

Davide

--
Do you have a point, or are you saving it for a special occasion?
-- David P. Murphy
Joe

2005-10-26, 7:55 am

Thanks for the info! I'm glad it's possible.. (and it seems really easy to
do too)
I've included the link to the Apache docs in case anyone else needs this
option available.
http://httpd.apache.org/docs/2.1/vhosts/name-based.html



"Davide Bianchi" <davideyeahsure@onlyforfun.net> wrote in message
news:slrndlu3hi.1rr.davideyeahsure@fogg.onlyforfun.net...
> On 2005-10-25, Joe <adfwe@joe.blo> wrote:
>
> Enable and use Virtual Hosts, see the documentation about VHosts on
> the Apache web site. In a pinch:
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
> ServerName ...thenamehere...
> DocumentRoot ...wherever...
> ...otherdirectives...
> </VirtualHost>
>
> <VirtualHost *:80>
> ServerName ...anothername...
> ...
>
> </VirtualHost>
>
> Davide
>
> --
> Do you have a point, or are you saving it for a special occasion?
> -- David P. Murphy



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com