Instructions for multisite installations are in sites/default/settings.php
. To quote from that file:
For example, for a fictitious site installed at http://www.drupal.org/mysite/test/, the 'settings.php' is searched in the following directories:
- sites/www.drupal.org.mysite.test
- sites/drupal.org.mysite.test
sites/org.mysite.test
sites/www.drupal.org.mysite
- sites/drupal.org.mysite
sites/org.mysite
sites/www.drupal.org
- sites/drupal.org
sites/org
sites/default
If you are installing on a non-standard port number, prefix the hostname with that number. For example, http://www.drupal.org:8080/mysite/test/ could be loaded from sites/8080.www.drupal.org.mysite.test/.
The lookup can be changed as described in sites/example.sites.php
:
This file allows you to define a set of aliases that map hostnames and pathnames to configuration directories. These aliases are loaded prior to scanning for directories, and they are exempt from the normal discovery rules. The aliases are defined in an associative array named $sites, which should look similar to the following:
$sites = array(
'devexample.com' => 'example.com',
'localhost.example' => 'example.com',
);
The above array will cause Drupal to look for a directory named "example.com" in the sites directory whenever a request comes from "example.com", "devexample.com", or "localhost/example".
BTW: multisite installations are usually done to facilitate using different databases.