Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 5 domains lets say Domain1.com domain2.com ... domain5.com.

Domain1.com to go to /www/domain1 folder on my server.  
Domain2.com to go to /www/domain2 folder on my server.  
...

I have whm/cpanel on my server.

share|improve this question

migrated from stackoverflow.com May 8 '12 at 15:43

This question came from our site for professional and enthusiast programmers.

2  
Set up 5 domains and set the document root to be the appropriate directory? –  Marc B May 6 '12 at 22:44
    
can you give me more information ... and also if i want to add more then 5 domains i want an easy way to make it... –  Aviv Remona May 6 '12 at 23:15
add comment

2 Answers

If you've access to httpd.conf file, you just need to change root directory of the VirtualHost configuration of domain1.com / domain2.com ... change root directory to /www/doamain1, /www/domain2, etc ...

share|improve this answer
add comment

It's hard to tell from the information provided if you literally mean /www/domain1 etc. If so the answer above would be your best solution but remember to make those changes in the appropriate EasyApache include file (not directly to httpd.conf). You can find these paths documented at: http://docs.cpanel.net/twiki/bin/view/EasyApache3/InsideVHost

If you just mean (some arbitrary path)/domain1 and (some arbitrary path)/domain2 - then options open up. First, you can create Domain1.com and Domain2.com as separate cPanel accounts, meaning they would go to /home/domain1 and /home/domain2 assuming domain1 and domain2 are 8 characters or less.

Alternatively, you could create a single cPanel account then add Domain1.com and Domain2.com as addon domains, which would put them in /home/(cpanel username)/(any path you desire) as you can specify any path within that cPanel user's home directory to be the document root for that domain when you are creading the addon domain, as detailed here: http://docs.cpanel.net/twiki/bin/vief/11_30/CpanelDocs/AddonDomains#Create%20an%20addon%20domain

Of course, with root access to a server, you could always symlink /www/domain1 etc. to the location cPanel & WHM uses.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.