Welcome to WebmasterWorld Guest from 54.145.208.64

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

single IP & multiple registered domains in APACHE

   
2:37 pm on May 30, 2009 (gmt 0)

5+ Year Member



Given two or more registered domain names pointing to a single static IP, what is the best way to direct the incomming requests to the individual directories?
Clearly there is no need for Virtual sub domains - but what is the direct way to set this up?

Thanks for any suggestions.

Chuck

4:40 pm on May 30, 2009 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld cwhoward1 :) My preferred method is to create a new user for each site and place each site within it's own user's home directory. For example the paths would be:

/home/site1/htdocs
/home/site1/cgi-bin
/home/site1/logs

/home/site2/htdocs
/home/site2/cgi-bin
/home/site2/logs

Then set up Name-based Virtual Hosts [httpd.apache.org] for each site. Each user gets its own ssh/FTP access and individual password. (I assume you are setting things up on a Linux/FreeBSD or other Unix server.)

What I hate the most is nested sites, ie. placing document roots for supplementary sites within the document root of the primary site.