Recently I had to create a multi-site Drupal system for a project (that means different organizations will be able to use the same Drupal system but with completely independent database, themes, modules, etc.) . Even though there are lots of documentation on this spread over the Internet it did not turn out to be very easy for my case.

Description of my case:

- An Ubuntu GNU/Linux server
- Drupal version 6 installed by aptitude install drupal6
- No domain names. I reach the remote server by its IP address e.g. http://100.101.102.103/drupal6

So the default set up is OK, I can visit http://100.101.102.103/drupal6 and see the content but I wanted to create another independent Drupal site using the same source codebase., e.g. http://100.101.102.103/drupal6/iris

The most critical part turned out to be not the instructions in the Internet documentation but in the /usr/share/drupal6/sites/default/settings.php file:

 * For example, for a fictitious site installed at
 * http://www.drupal.org/mysite/test/, the 'settings.php'
 * is searched in the following directories:
 *
 *  1. sites/www.drupal.org.mysite.test
 *  2. sites/drupal.org.mysite.test
 *  3. sites/org.mysite.test
 *
 *  4. sites/www.drupal.org.mysite
 *  5. sites/drupal.org.mysite
 *  6. sites/org.mysite
 *
 *  7. sites/www.drupal.org
 *  8. sites/drupal.org
 *  9. sites/org
 *
 * 10. sites/default

According to this explanations if I want to have another Drupal site such as http://100.101.102.103/drupal6/iris then I should create a directory like that

100.101.102.103.drupal6.iris

in

/usr/share/drupal6/sites/

and this seems to be the most critical part that caused me trouble until I realized the solution. Except this I just copied the settings.php from the existing /usr/share/drupal6/sites/default/ directory to the directory I created above, did the dbconfig.php customization, created another database in MySQL server and did not forget to create a symbolic link by issuing the command

sudo ln -s . iris

at /usr/share/drupal6

Finally I pointed my browser to http://100.101.102.103/drupal6/iris/install.php and everything worked as expected.

Some more URLS:

- Create Multi-site for dummies

- Grant write permissions on the configuration file

- Run multiple sites from the same code base (multi-site)

Benzer Yazılar / Similar Posts:

Tags:

This entry was posted on Friday, February 26th, 2010 at 12:20 pm and is filed under sysadmin. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment