Hello All,

I've read extensively on multi-site installations of Drupal 7 using a shared code base hoping to replicate the results, but to no avail. I've tried everything in the instructions on pages:

http://drupal.org/documentation/install/multi-site
http://drupal.org/node/138889
http://drupal.org/node/960934
http://drupal.org/node/348619

Still not working...

Background: I'm using Cpanel on a VPS hosting account. I've tried adding the "site2.com" directory in the /sites folder like everyone suggests but always get the "Oops, Google chrome could not find the... blah blah." In Cpanel, I've tried using the add "Addon Domain", add "Parked Domain", and add "Subdomain" functions. None of these produce the desired results.

My question is: is it possible to host multiple sites (ie www.site1.com, www.site2.com, www.site3.com, etc) on a single Drupal 7 installation using a shared code base WITHOUT using subdomains? The literature available seems to say that it is (and that it's as easy as 1-2-3 to set up), but I can't seem to make it happen.

The only progress that I was able to make is that I can configure my sites to work as subdomains of one another (ie www.site1.com as the initial installation and then www.site2.site1.com as a subdomain), but this is not ideal since the two sites are completely different and not meant to be subdomains of one another.

Please help!

Alex

Comments

vm’s picture

when you add the new domain where do you point it? all domains must point to the main domain's folder so that it can hit index.php and let it do it's magic.

alexj1234’s picture

I've been pointing to the document root - in my case "public_html" which is the same directory that Drupal core lives in.

vm’s picture

are you sure the 2nd domain name propagated after purchase? how long ago did you purchase the second domain name?

alexj1234’s picture

VM, I purchased the domain about two years ago and was using it for another project until last month. The part that's bothering me the most is that, like I said, I can get everything to function perfectly when I go the subdomain route. Right now I have staging.example.com working exactly as advertised, but when it comes to using an entirely different domain name I'm flat stumped. By the way, thanks for the suggestions so far.

vm’s picture

you checked to make sure the DNS of the second purchased subdomain is pointed properly?

a subdomain of the working main domain has no bearing on the issue as a subdomain has nothing to do with the problematic domain. What a working subdomain tells you is that the main domain of the subdomain is working properly.

alexj1234’s picture

Regarding the pointing of the subdomain, I have followed the instructions outlined in the links above many times: create a second database, add the sites/site2.com directory, copy the settings.php file, change permissions on that file, and then use the (I've tried all three) "Add Addon Domain" "Add Parked Domain" and "Add Subdomain" Cpanel functions for the site2.com domain. I've actually ended up installing, completely deleting, and reinstalling Drupal core about 4 times trying to get this work. The only one that will function properly is the "Add Subdomain" function which of course doesn't require an additional registered domain (I'm using test.primary.com).
Despite having 2 other registered domains on the same account, I can only get them to work as subdomains of what my host calls my "primary" domain (e.g. site2.primary.com, site3.primary.com, etc) which doesn't really mean anything since I could use anything as the subdomain... im-pulling-my-hair-out.primary.com if I wanted.
Every time I follow the multi-site setup instructions, I get a "page not found" when I enter the site2.com or site2.com/install.php into my browser.
The problem seems to be that Drupal is not able to locate or access the appropriate sites/site2.com folder and get to the settings.php file within...

vm’s picture

you checked to make sure the DNS of the second purchased subdomain is pointed properly?

should have referred to domain not subdomain.

To figure out if this is a drupal issue or a server configuration issue. I'd remove drupal from the equation (backup and delete the files/folders).

Then I'd use a standard index.html file can you hit that with the domain names? if not, this issue isn't drupal related.

alexj1234’s picture

VM,
Yeah the index.html file is a good idea. Honestly I will probably not be trying it anytime soon because I've already downloaded, deleted, and reinstalled Drupal so many times trying to get this to work. For now, the subdomain configuration is serving its purpose of allowing me to play around with one site while not breaking my primary domain setup. Thanks a lot for all of your suggestions!