I just successfully installed a drupal multi-site with the guide from http://drupal.org/node/547860, though there is still a little problem needs to face. I created three folders in the directory sites, sites/sc.com, sites/a.sc.com, sites/b.sc.com. I start the installation with a.sc.com, and then b.sc.com. Everyting works fine, but after I installed sc.com in the browser, I can't install other subdomain sites any more. Like, I create a new empty folder sites/c.sc.com, and when I point my broswer to the URL c.sc.com, broswer will take me to the sc.com site, rather than the installation page of site c.sc.com. It seems there is a installation order to make this multi-site feature work, and I have to sart with the subdomain sites.
Has anyone met this problem before? If this is ture that I can't add other sundomain sites after the main-domain site has intalled, I'm afraid this feature has a serious shortcoming.
Any help will be appreciated. Thank you!


VM’s picture

the multisite test I set up doesn't not react this way. I can create new subdomains before and after the maindomain is installed. I'd imagine there is some environmental issue at play. How is the environment set up?

smiletrl’s picture

Hi, VM,
This environment is listed in the subject. But, after some reconsideration, I guess I've found the answer.
If I install sc.com before other subdomain, next time, when I try to install c.sc.com in the browser, drupal will use the settings.php inside sc.com folder. According to search rule, drupal will firstly check the folder c.sc.com to see if there's a settings.php inside it for this URL request. If settings.php is not found, it will check the folder sc.com to find settings.php. Of course, sc.com has been installed before and there's such a settings.php file existing inside the folder sc.com. So drupal will use this settings.php instead of recreating one, which means installing a new subsite from scratch.
A solution is to create a www.sc.com folder, not sc.com folder. In that way, URL request, like c.sc.com, will not use settings.php inside folder www.sc.com. And any subdomain site could be installed. I used this solution to fix the ordering problem I reported.
So, is this really where the magic is? Any ideas?

alisharow21’s picture

Thanks for the information.............

smiletrl’s picture

Hi, alisharow21, I use www.sc.com folder instead of sc.com folder to sove this problem.
Hope this could help.