Welcome to WebmasterWorld Guest from 50.17.16.177

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)

New User

5+ Year Member

joined:May 30, 2009
posts: 1
votes: 0


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)

Senior Member from CA 

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

joined:Aug 31, 2003
posts:9063
votes: 2


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.