Hi, I'm trying to set up Drupal so that it's a multisite. I want each additional site to have its own database. I've tried to follow the instructions from http://drupal.org/node/138889 and http://drupal.org/node/53705 to no avail. Could someone suggest a complete how-to on setting up a multisite using Unix.

This is what I have so far. I've created the following directories

sites/all:

modules/ themes/

sites/default:

files/ settings.php

sites/www.example.com:

files/ modules/ settings.php themes/ tmp/

The "files/", "modules/", "themes/", and "themes/" directories are all empty. For the "all/modules" directory should I copy all the files from the modules folder I use for my current drupal site?

I've also set up a mysql database. However, every time I browse to the newly added site I don't see the drupal interface.

Thanks.

Comments

pbarnett’s picture

Hi!

Take a look at http://drupal.org/node/205000

If that doesn't answer your questions, I can advise you further...

Pete.

thaironius’s picture

Thanks for the link. So, I modified settings.php changing $db_url and $base_url. I was wondering with $base_url I should have http://localhost/directory-where-drupal-is-installed/sites/mywebsite.com, right?

In addition, I also added a symlink from the mywebsite.com directory to directory-where-drupal-is-installed. This created a symlink called "html".

Despite these additions, for some reason every time I browse over to http://localhost/directory-where-drupal-is-installed/sites/mywebsite.com I still just get the page showing the directory of folders.

4cornersusa.com’s picture

The base URL is http://localhost/directory-where-drupal-is-installed/
only.

So, for the first domain you might have something like http://my1st-domain.dom/ that is the base or root.

On my Ubuntu-LAMP the actual file path looks like this; "/home/user-name/public_html/"
You could/might have Drupal in its own directory in which case the path may be like "/home/user-name/public_html/drupal-install/"

That is how I point my base_url depending on which way I have drupal installed.

Hope that helps.

pbarnett’s picture

Hi.

If your Drupal installation is in /home/user/public_html/Drupal for example, and a symlink to the Drupal folder called /home/user/public_html/newsite then browsing http://localhost/newsite should resolve to a Drupal site configured in /home/user/public_html/Drupal/sites/newsite.

Pete.

thaironius’s picture

Thanks for the suggestions. I've tried what was advised above with no luck. Maybe it would help if I precisely outlined my set up.

Drupal is installed in /var/www/html/. This directory contains the core directories (e.g. files. modules, includes, and sites).

In "sites", there are the directories "all", "default", and "mysite.com", which is the new site I'm adding.

In "mysite.com", there are the directories "files", "modules", "themes", and "tmp". In addition, there is a symlink "html" that points to /var/www/html/. To be more specific, CDing symlink takes you to /var/www/html/sites/mysite.com.com/html which contains everything that /var/www/html/ contains.

Following the suggestions that have been provided, I have set $base_url = 'http://localhost/html in settings.php. However, browsing to http://localhost/mysite.com brings me to a "Not Found" page. But, browsing to http://localhost/html/sites/mysite.com/ brings me to a directory page which contains all the folders in /var/www/html/sites/mysite.com.com/.

Hope that illuminates some possible issues that I previously didn't mention.

pbarnett’s picture

OK. assuming that your Apache document root is set to /var/www/html, try this :-

Move your Drupal installation to /var/www/html/drupal
This should be accessible as http://localhost/drupal

Create a folder called /var/www/html/drupal/sites/mysite and put the settings.php file in there.

Create a symlink to this directory in /var/www/html called mysite
This should take you to the multisite installation if you browse to http://localhost/mysite

Let me know how it goes!

Pete.