[thelist] [apache] multiple applications (domains) on one server

Hassan Schroeder hassan at webtuitive.com
Sun Oct 31 16:54:10 CST 2004


Paul Bennett wrote:

> I am an Apache N00b who is getting to grips with documentroot, 
> virtualhost ect.
> 
> Q: I have ny current documentroot (dev server) set up to one application 
> directory
> eg: /public/application1/
> 
> Trouble is I now want to also run and develop for /public/application2/
> and apache sees doc root as inside public/application1 /
> 
> I know it is possible to run multiple sites / applications on one server 
> and have had a luckless try with virtualhost in the httpd.conf file, can 
> anyone give me some pointers as to how this can be set up?

Have you read this:
   <http://httpd.apache.org/docs/vhosts/name-based.html>

Basically, as the above says, it's just:

     NameVirtualHost *

     <VirtualHost *>
     ServerName www.domain.tld
     DocumentRoot /www/domain
     </VirtualHost>

     <VirtualHost *>
     ServerName www.otherdomain.tld
     DocumentRoot /www/otherdomain
     </VirtualHost>

If your configuration isn't working, run Apache -S to get a config
test, and post the result and your httpd.conf...

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.




More information about the thelist mailing list