Hi all

I tried to create multi-site sites (called app1-dev.net.nz and app2-dev.net.nz) with only one drupal core . Here is my method based on "http://drupal.org/node/107347"

Created two subfolders /sites/app1-dev.net.nz and sites/app2-dev.net.nz
then copy the default setting.php from sites/default/setting.php into these two subfolders
Then change the value $db_url in these two setting files like this (suppose that I already created 2 drupal databases in localhost)

$db_url = pgsql://app1@localhost/app1 (for /sites/app1-dev.net.nz/setting.php)
and
$db_url = pgsql://app2@localhost/app2 (for /sites/app2-dev.net.nz/setting.php)

However, when enter URL app1-dev.net.nz, it gives me the page "Database Configuration" (requires me to enter database name, host, port .....)

It can be seen that drupal reads the config file from /sites/default/setting.php, not the one from /sites/app1-dev.net.nz/setting.php

The same thing happens when I enter "app2-dev.net.nz"

Any help, please
Many thanks

Comments

davidhernandez’s picture

Hi,

Are your credentials correct? You wrote "pgsql:app1@localhost" I don't know if postgre is different from mysql but it is normally username:password@localhost. If your credentials are not correct that may be why you are getting the screen asking you to fill in the information, and it is defaulting the settings.php file in the default directory.

I normally do subsites based on the domain.com/sub1 model instead of sub1.domain.com, but the last time I did I think I had to configure Apache with a virtual host to send requests for sub1.domain.com to the right place. Did you do that? Although, I would think if it isn't working you would just get a "not found" error.

johnhelen’s picture

My db_url donot need to have password (password is blank) as it is postgres.
I think that "load balance" is the problem...