There are two url form for multi site: subdomain (site1.domain.com, site2.domain.com) and suburl (domain.com/site1, domain.com/site2).
I want to create couple sites: www.gt.com; www.gt.com/site1; site2.gt.com. I can also create something like this: site1.gt.com/site2
1. Add virtual server to apache
Allow from all
ServerName gt.com //this is good enough to take care of gt.com/site1; gt.com/site2 ... (but make sure set the symbolic link otherwise you will get "page not found" error
ServerAlias *.multisite.com //this takes care of: site1.gt.com; site2.gt.com .....
CustomLog logs/air-access_log common
( REMEMBER: all sites must point to the drupal base installation directory, also make sure to set symbolic link if using suburl format)
2. Modify window host file to point to the domain name, the location of the host file can be refer from http://leoman730.blogspot.com/2007/07/hostfile-location.html
3. Create new directories ("gt.com"; "site1.gt.com"; "gt.com.site2" under ) in path_to_drupal_installation/sites.
Tip: the directory name must match the site location by replacing '/' with '.'
Copy the settings.php file the default directory into these new directories.
Modify the settings.php accordingly for base_url, and db_url parameter.
Ex: in "gt.com.site2" directory, the base_url should be set to
$base_url = 'http://gt.com/site2';
Also need to modify the db_url to point to the correct database for each site
4. Create symbolic link for subsite (This is need is using suburl format)
I am using wamp as example, add alias by create a new alias file. The code should looks like this:
Alias /site1 "c:/wamp/www/multisite/" //multiple alias can be added here
Options Indexes FollowSymLinks MultiViews
Allow from all
4. Don't run the install script yet. Create new database for each site using any available tool such as phpadmin, or mysql admin
5. If the re-write moudle for appach has not been turned on yet, you need to turn that on: See this post for more info: http://drupal.org/node/15365. Turn this on will enable drupal Clean URL feature
6. Very Important. After all these modification, restart apache server and mysql server
7. Go to the new site and run the install.php