Multisite Drupal

Download the latest Drupal Code base.
Then, upload and extract all the files into a new folder for Drupal. For example: /public_html/drupal/

Next step 
In this example i'll be creating two websites
test1.localhost.com
and 
test2.localhost.com

I Will be needing two database for two sites
test1_db

test2_db

Next step is to inform drupal about our need for multisite. 
So we need to add the sites.php file.
You can find extra examples and documentation of how to set it up in the example.sites.php file.

Copy the file and rename it to sites.php
add the following lines to configure the above sites

$sites['test1.localhost.com'] = 'test1.localhost.com';

$sites['test2.localhost.com'] = 'test2.localhost.com';

Next step will be:
In /drupal/sites  create the following folders 
test1.localhost.com
test2.localhost.com

After above configurations (copy sites/default/example.settings.php into  sites/subsite/settings.php and edit it) you need to install both the site using url below and then after installation you can access your multi site feature.

test1.localhost.com/core/install.php

test2.localhost.com/core/install.php

You can find more info on multisite in core/INSTALL.txt.

摘录
计算机