If you're installing Drupal on a server with just an IP address (no useable hostname available), and you want to have a per-host settings directory, you have to either use the 'defaults' directory or create a directory using the IP address, you cannot just override the site alias in sites.php with the IP address.

An example:

I wish to create an installation at http://127.0.0.1/ and make it have its own separate configuration directory. I should be able to edit sites.php and add this:

$sites['127.0.0.1'] = 'local';

This would allow me to create a directory "sites/local" to store the per-instance settings file. Because of this bug I instead have to create the directory sites/127.0.0.1 and add the file there.

Comments

cweagans’s picture

IMO, this is a bug. If we can create this mapping by creating the directories in sites/, then sites.php should support it as well.

damienmckenna’s picture

Status: Active » Closed (works as designed)
Issue tags: +#facepalm

It helps if you name the file "sites.php" instead of "site.php".