Drupal - settings.php

The configuration directory will be discovered by stripping the  website's hostname from left to right and pathname from right to  left.

The first configuration file found will be used and any  others will be ignored. If no other configuration file is found then the default configuration file at 'sites/default' will be used.

For example, for a fictitious site installed at http://www.drupal.org/mysite/test/, the 'settings.php'
is searched in the following directories:

 *  1. sites/www.drupal.org.mysite.test
 *  2. sites/drupal.org.mysite.test
 *  3. sites/org.mysite.test

 *  4. sites/www.drupal.org.mysite
 *  5. sites/drupal.org.mysite
 *  6. sites/org.mysite

 *  7. sites/www.drupal.org
 *  8. sites/drupal.org
 *  9. sites/org

 * 10. sites/default