INSTALL INSTRUCTIONS ==================== Assuming you will make all new sites available at /site/{shortname}/ 1. PUT SOMETHING LIKE THIS IN YOUR APACHE CONFIG: AliasMatch ^/site/\w+/(.*) /var/www/drupal/$1 DocumentRoot /var/www/drupal/ WARNING:CLEAN URLS demand a much more complicated setup with a bunch of rewrite rules. See the Appendix in this file for details 2. PUT SOMETHING LIKE THIS IN YOUR ./sites/default/settings.php or better at ./sites/www.example.com.site/settings.php ----CODE BEGIN----- $requri = explode('/', request_uri()); if (sizeof($requri) >1 && $requri[1]=='site' && $requri[2] != '') { $my_site_base = $requri[2]; #this will be the database shared between the main site and the shared sites $db_url = 'mysql://username:password@localhost/database'; $db_prefix = $my_site_base."_"; $base_url = "http://www.example.com/site/$my_site_base"; // NO trailing slash! } ----CODE END------- 3. Any modules required for profile selections must be installed on BOTH the main site's modules directory AND the subsidiary site module directory (a symlink will do just fine); the former in order to install, the latter in order to run. APPENDIX: ========= How to get CLEAN URLS working with apache and multisite setup: It's gross! I told you so!!!!! DocumentRoot /usr/local/share/sandboxes/common/drupal/drupal/ # Welcome to the Ugliest Rewrite Rules Evar(tm)! # Here's the jist: # 1. AliasMatch will set the file context without passing a different URL to Drupal # Therefore index.php must be matched outside of Rewrite rules # 2. Rewrite is used ONLY to forward URLs of the form /xxx -> index.php?q=/xxx # # If we took Rewrite rules outside of the Location contexts so its in per-server # processing, we might be able to simplify this. We would need option 'PT' for # passthrough and then some AliasMatch record AFTER the rewrite rules. # If you figure it out, then go for it. Otherwise, what ain't broken... AliasMatch ^/site/\w+/index.php /var/www/drupal/index.php AliasMatch ^/site/\w+/(modules|misc|files|themes|sites)/(.*)$ /var/www/drupal/$1/$2 RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^var/www/drupal(.*)$ index.php?q=$1 [L,QSA] RewriteEngine on RewriteCond %{REQUEST_URI} ^/site/ RewriteCond %{REQUEST_URI} !index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/var/www/drupal/site/(\w+)(/)?(.*)$ http://www.example.com/site/$1/index.php?q=$3 [L,QSA]