Finishing off the multi-site setup

3 June 2009

A few days ago I posted about how I was going about setting up a multi-site Drupal setup. After a bit more work, it's finally finished along with single sign on and clean URLs working nicely on both sites (with the other files from before the Drupal installation on the second site still accessible too!).

Accomplishing this became somewhat confusing. I wanted to provide access to the old files, so simply adding this to the configuration:


Alias / /path/to/drupal/install

Was unfortunately not an option. In the end I reverted to aliasing each individual Drupal file/directory to the corresponding file/directory in my original install.

This meant doing this in the directive:


Alias /index.php /path/to/drupal/install/index.php
Alias /cron.php /path/to/drupal/install/cron.php
Alias /install.php /path/to/drupal/install/install.php
Alias /robots.txt /path/to/drupal/install/robots.txt
Alias /update.php /path/to/drupal/install/update.php
Alias /xmlrpc.php /path/to/drupal/install/xmlrpc.php
Alias /includes /path/to/drupal/install/includes
Alias /misc /path/to/drupal/install/misc
Alias /modules /path/to/drupal/install/modules
Alias /profiles /path/to/drupal/install/profiles
Alias /scripts /path/to/drupal/install/scripts
Alias /sites /path/to/drupal/install/sites
Alias /themes /path/to/drupal/install/themes

It's not as neat, however, it allowed me to also install the normal Drupal htaccess file. Which meant I could finally get 'Clean URLs' working properly.

I then had to setup a second cronjob for the second site and I searched on Drupal for an easier way to handle this. A script turned up here which seems to work well.

The final thing I wanted to do is enable some sort of single sign-on, because the users database was shared. A quick search turned up the Shared Sign-On module which works perfectly.

So, after a bit more testing, I've finally perfected my multiple-site installation!

 

Comments

Nobody has commented on this post yet.

Add comment

If you wish, you can add a comment.