You're probably going to need a bit more data in you vhost
configurations... i.e. Allow and/or Deny configs, but otherwise you
should be fine...

The DNS/Hostfiles suggestion is a good suggestion... I hadn't thought
of that. :)

But... you might also want to add "DirectoryIndex index.cfm
index.html" to each. It's important to remember that as soon as you
add a vhost entry to your config Apache quits resolving any of your
default server entries, so you will need to have any settings required
to make a default server work in each vhost.

This URL could be quite helpful...

http://httpd.apache.org/docs-2.0/vhosts/name-based.html

Note the ServerAlias setting, which allows you to use multiple names
per vhost... i.e. you can have multiple "hosts" per "server" when
using a vhost setup.

Also important to note is this:

Main host goes away
If you are adding virtual hosts to an existing web server, you must
also create a <VirtualHost> block for the existing host. The
ServerName and DocumentRoot included in this virtual host should be
the same as the global ServerName and DocumentRoot. List this virtual
host first in the configuration file so that it will act as the
default host.

I don't think your localhost config is going to work as a default
site, because the default server goes away...

Gotta run, but I hope that helps...

Laterz!

J

On 4/23/05, Mike Kear <[EMAIL PROTECTED]> wrote:
> I'm needing a little help in understanding Apache's configuration
> please.   I want to set up my various sites on my pcs as virtual hosts
> in apache, but not sure
> 
> My directory structure is as follows:
> c:/sites
> c:/sites/intranet
> c:/sites/clientsite1
> c:/sites/clientsite2
> ....etc
> 
> and I understood I could set it up so I can find the sites in my browser with 
> :
> http://localhost (gives  a directory listing of c:/sites )
> http://intranet
> http://clientsite1
> http://clientsite2
> ..... etc.
> 
> but i'm not sure what i should put in my http.conf file.  I have the
> following at the very bottom of the file but it doesnt work - can
> anyone tell me what I've got wrong please?
> 
> NameVirtualHost *:80
> 
> <VirtualHost *:80>
> ServerName intranet
> DocumentRoot /sites/intranet
> </VirtualHost>
> 
> <VirtualHost *:80>
> ServerName clientsite1
> DocumentRoot /sites/clientsite1
> </VirtualHost>
> 
> <VirtualHost *:80>
> ServerName clientsite2
> DocumentRoot /sites/clientsite2
> </VirtualHost>
> 
> --
> Cheers
> Mike Kear
> Windsor, NSW, Australia

-- 
---------------
-------------------------------------
Buy SQLSurveyor!
http://www.web-relevant.com/sqlsurveyor
Never make your developers open Enterprise Manager again.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204179
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to