blitzlight
09-06-2002, 08:05 AM
Hi all,
If I have Directory structure like this:
/home/domain1/www/domain2.com
/home/domain1/www/domain3.com
/home/domain1/www/domain4.com
How do I point these Domains
http://www.domain2.com/ -> /home/domain1/www/domain2.com
http://www.domain3.com/ -> /home/domain1/www/domain3.com
http://www.domain4.com/ -> /home/domain1/www/domain4.com
Can I do the above via WHM?
or shall I do it in httpd.conf?
Thanks for your help & regards
MotleyFool
09-06-2002, 08:55 AM
You create the domains in WHM and then go edit your httpd.conf , save it and then restart httpd.
Change DocumentRoot in <VirtualHost .. > for domain2
from /home/domain2_username/www to whatever you want
blitzlight
09-06-2002, 08:59 AM
Thanks MotleyFool, I wonder whether this can be done via CPANEL??
What is Domain Addons? What's the difference with Domain parking?
MarlboroMan
09-06-2002, 11:12 AM
blitz:
I believe that setup is not possible through CPanel/WHM, they only handle subdomains for accounts, eg. http://blah.account1.com and http://blah2.account1.com
The easiest way would be to manually setup additional VirtualHost sections in httpd.conf. Just don't forget to delete them if/when the primary account leaves!
Techark
09-06-2002, 11:19 AM
Just park the domain on top of the sub directory.
That is basicly what the new Addon domain does in Cpanel it just gives the user the ablity to do it with out you having to park the domains for them as the host.
You can use the addon feature to give multi domain hosting to your clients.
Ahmad
09-06-2002, 01:27 PM
I'm not sure how WHM & CPanel work. If you can edit your httpd.conf file, try this:
http://httpd.apache.org/docs/mod/mod_vhost_alias.html
I believe this is the best method for multiple domain hosting.
SPaReK
09-06-2002, 01:44 PM
If the accounts are on different servers. I usually make a simple PHP script:
<?php
header("Location: http://domain.com/path/to/directory");
?>
I then edit the .htaccess file so that a customized 404 page points to the index.php file with the above script.
ErrorDocument 404 /index.php
blitzlight
09-06-2002, 05:24 PM
Thanks to everyone that have replied :)
Monte,
Yeap, I'd prefer for customer to be able to do this without involvement on my part. But, how do you associate the addon domain name with the directory from Cpanel? i.e. if I have domain2.com, how do I associate that domain with this directory /home/domain1/www/domain2.com/
Regards
MotleyFool
09-07-2002, 06:12 AM
you should also worry about domain2 owner FTP'ing content into domain1/www/directory
admin0
09-07-2002, 02:28 PM
Hi.
/home/domain1/www/domain2.com is also domain2.domain1.com, and you can park domain2.com on top of domain2.domain1.com via WHM.
:homer: