8.21.2009

Our Multisite setup

This is the multisite set up we use with "T" managing the server files and "M" managing files from the drupal folder down:

To set up a new site using Drupal’s “Multi-site” capability:

  1. T sets up new database (if necessary)
  2. T sets up an Apache alias for /foo
  3. M adds a block of RewriteCond/RewriteRule to /.htaccess*
  4. M adds sites/mainurl.foo folder (e.g. drupal.www.myedu.edu/.../foo)
  5. M adds settings.php file to the new folder from (4)
  6. M notifies T that it’s ready, T kicks Apache to recognize new Alias from (2)

(*) The RewriteCond/RewriteRule block looks like this:

# For: /foo

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{THE_REQUEST} ^/foo/
RewriteRule ^(.*)$ foo/index.php?q=$1 [L,QSA]

These all need to be *above* the default RewriteCond/RewriteRule block, which should be the last few lines of the file above :

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

No comments:

Post a Comment