Multisites basic - Shared drupal, individual DB

Events happening in the community are now at Drupal community events on www.drupal.org.
hebhansen's picture

Hey

I am setting up my first multisite and I can't seem to get started??? I do not operate a server. I am hosted in town!

1) I have my Drupal running as a standalone site
www.mysite.com
2) I created a subdomain for the new site
www.shop.sites.mysite.com
3) I created a DB for the new site
4) I copied settings.php to the root of the new site
www.shop.mysite.com/settings.php
5) settings.php setup in the new site

DB
$db_url = 'mysqli://myuser:mypass@mysql.host.dk:3306/db_name';
$db_prefix = '';

$base_url = 'http://www.shop.sites.mysite.com';

$cookie_domain = 'shop.sites.mysite.com';
(I don't want to share users, rather keep them apart)

I don't know where to go from herè???

Should I copy .htacces to the new site?
Should I copy install.php to the new site?
Is my configuration wrong?

When i go to: www.shop.sites.mysite.com

I get: Forbidden - You don't have permission to access / on this server.

Please help. I cant seem to get any further

Henrik

Comments

Henrik; What happens if you

Garrett Albright's picture

Henrik;

What happens if you just create a simple standard HTML page and upload it into your Drupal root directory, then try to access it directly (www.shop.sites.mysite.com/page.html)? If you still can't see it, it's possible that the subdomain is not set up correctly, and is "pointing" at the wrong directory. (It should point to your Drupal root directory.)

Is the new domain supposed

hebhansen's picture

Is the new domain supposed to point at the old domain?

Pointing site 2 to site 1

hebhansen's picture

Pointing site 2 to site 1 just give me the exact same site

Well, it's supposed to point

Garrett Albright's picture

Well, it's supposed to point to the same web root as the old domain, yes. Not necessarily point to an old domain…

ok - so the new site 2 is

hebhansen's picture

ok - so the new site 2 is pointing to the old site 1

I have exactly the same site although my new DB is empty since it is not yet installed??? Why?

Do I run install.php?
_ im worried that might mess up the DB of site 1

I can not beleive that no-one knows the answer. I have been stuck here for 3 days now and this would probably take someone 5 minutes to explain

Basically what I need is this process layed out for dummies. As mentioned, 1st time multisite install.

Content shows up on both

hebhansen's picture

Content shows up on both sites, so I guess I am doing something wrong.

What is it?

My site is physically placed

hebhansen's picture

My site is physically placed in its own folder. Is that a prblem?

www.drupal.site1.com
www.site2.sites.site1.com

???

Help urgently needed...

og should site 2 go in the

hebhansen's picture

og should site 2 go in the sites folder of site 1???

If you're seeing the same

Garrett Albright's picture

If you're seeing the same content at both addresses, then the likely cause is that you haven't set up the directory for the new site correctly. Yes, the directory for the new site should go in the sites directory, and it should be named with the second site's domain name - so sites/site2.sites.site1.com in your example above.

In the future, please contain your comments to a single comment using the "edit" feature and give other people time to respond before posting again. Thanks.

Multisite directory structure

davidwheelerphd's picture

www.mysite.com should point to the directory where drupal is installed: /drupal
There should be a directory/settings.php file like this: /drupal/sites/shop.mysite.com/settings.php
Have that settings.php file reference your database.
Now set up subdomain name "shop" so that it points to /drupal/shop
DELETE /drupal/shop from your directory structure.

Make file called createmysymlink.php which contains the following and place it in the /drupal directory. (You might have to have a more complete path before /drupal if required by your hosting service. I have to use 'home/username/public_html/drupal')

<?php

$success
= symlink('/drupal', '/drupal/shop');
if (
$success)
    echo
" Symlink SHOP was created ";
else
    echo
" Symlink SHOP creation FAILED! ";

?>

Once this is in your /drupal directory, browse to http://www.mysite.com/drupal/createmysymlink.php

If the symlink was created, everything should work now. When you browse to shop.mysite.com you should get the dialog for a new Drupal installation.

The www might need to be played with. Personally, I just set up my sites and subdomains without the www.

For multisites, make a new subdirectory in /drupal/sites with the exact complete subdomain name.
Modify the createmysymlink file to have a symlink command for each of your subdomains.

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: