PDA

View Full Version : Virtual Hosts in Apache


kwiersma
June 26th, 2002, 02:22 PM
I figured out that I could probably set up apache to have several virtual hosts for each web project I work on. This way I could just go to http://project1/ and http://project2/ and I could have separate document roots for each project.

Does anyone know the right apache httpd.conf directives to set this up so that http://project1 points to a directory on my hard drive and http://project2 points to a different directory?

Thanks. :)O

howardm4
June 26th, 2002, 04:15 PM
when in doubt, use the gobs of
documentation available to you.

http://httpd.apache.org/docs-2.0/vhosts/examples.html#purename

hazmat
June 26th, 2002, 10:07 PM
Just in case some of the info for Apache 2.0 varies, you should stick with http://httpd.apache.org/docs/vhosts/index.html , since unless you installed 2.0, OS X runs 1.3.x. You probably want to use name-based vhosts.