I've set up multi-site a number of times, both locally and on a shared cPanel hosting provider (with sites in subdomains or folders). But I've now moved to a (shared) reseller account and having trouble setting up multi-site with another domain name in another WHM account.
I've tried various techniques, including the following:
1. Installed Drupal in a sub-folder on my main site, eg mainsite.com/drupal6. (It has to be in a sub-folder because we don't only use Drupal).
2. Created a WHM account for the other site (an amateur sporting club) with a different domain name, eg sportingclub.org.
3. Created a new MySQL database in the main site account for the sporting club site.
3. Added the extra sites folder to the Drupal installation, eg: sites/sportingclub.org. And then copied settings.php into this folder, edited the $db_url line adding the correct username and databasename for the sporting club database. Then edited the $base_url line, eg sportingclub.org.
4. Tried creating a symlink from /home/sportingclub/public_html/ to /home/mainsite/public_html/drupal6.
The result: The files and folders within the /home/sportingclub/public_html/ folder remain unchanged, so obviously the symlink hasn't worked. Not surprisingly, trying run the Drupal install from sportingclub.org results in a 500 Internal Server error message.
I'm guessing the sportingclub WHM account doesn't have permission to access /home/mainsite/public_html/drupal6. I've tried changing permissions to the drupal6 folder, and few variations of the symlink, but it still doesn't work.
I guess I could forget using a WHM account for the sporting club site, and just use an add-on domain to the main site instead. However, ideally, I'd like to be able to use the WHM features (eg restricting bandwidth and disk space).
Please forgive yet another multi-site question here but I've read (and followed) many multi-site guides on drupal.org and elsewhere. There is one technique described at http://owahab.com/content/drupal-multi-site-different-databases-cpanelwhm but I'd prefer to do it myself without having to go to my provider.
Is there another way to make this work?
Thanks.
Comments
I am trying to do the same
I am trying to do the same exact thing.
I am about to experiment with creating a drupal group and having all the account users in that group and maybe that will give them php access to the base install?
Good luck
Please let me know how you go. For the moment, I'll probably just use add-on domain on the main site. But Id love to find a way to multi-site with another WHM account. Thanks.
4. Tried creating a symlink
4. Tried creating a symlink from /home/sportingclub/public_html/ to /home/mainsite/public_html/drupal6.
When you cd /home/sportingclub/public_html/ do you cd into /home/mainsite/public_html/drupal6 ?
If not, you should first remove (probably backup) the public_html directory and create the symlink afterwards.
Good idea but
Thanks for your help, but I tried a similar thing: creating the symlink from a subdomain, too.
After the creating the subdomain, eg test.sportingclub.org, I deleted the resulting sub-folder, and then tried creating a symlink from /home/sportingclub/public_html/test to /home/mainsite/public_html/drupal6. This actually created the sub-folder /home/sportingclub/public_html/test. However, it was blank inside the folder, so obviously, the symlink didn't work.
Any other ideas?
Unix permissions
I know I'm... like.. a year late on this, and maybe it's been worked out by now (link?).
My thought would be that you need to create a user group in Unix and grant the directory and file permissions to that group of users for RWX? 775 instead of 755?
Thanks
Thanks, steingard, but I think it was the shared hosting environment. I'm in the process now of moving to VPS so hopefully there shouldn't be a problem if I want to do this in future.
Go through single account
Sorry to reopen this so late. Does anyone still need an answer to this? I believe I have a solution that works well.
Yes, I would be interested
I no longer have an urgent need, but I'm still very interested in your solution, bks14.
I never came up with a decent
I never came up with a decent solution mostly because I abandoned multi site. I am currently researching using Aegir to manage multiple sites that are deployed on different cpanel servers.