I am trying to test multi-site functionality using the same code base. I have a subfolder that will serve as the house for the new site. I have also created a new database for the new site, and a settings.php for it in the following way:

www.mysite.com.folder/settings.php

Following the steps outlined below I have completed steps 1, 2, but I am confused as to how to complete steps 3 and 4
1. Create your new site directory in /sites folder
2. Place a new, blank settings.php file in the directory.
3. Edit the appropriate settings in your web server to point to the Drupal root directory
4. Browse to the site to see the install script, proceed to step 2 of the install.txt.

The folder is currently empty and the sites/www.mysite.com.folder/settings.php is pointing to the new database, but the actual folder www.mysite.com/folder has nothing in it. Am I suppose to put the install.php script there? from the core files on my root site?

Comments

rogerpfaff’s picture

i don't know if this is a typo but the folder for your site should be named "www.mysite.com" without the folder string.

then your webserver configuration should point to the drupal directory. so if you created a folder in the root of your webserver named "drupal" your domain www.mysite.com leads internally to /drupal and drupal itself will take the appropriate settings.php. make this file writable so that the install script can edit it and insert the right database information you will provide while installation.

and this should give you the go.

------------------------------------------------------
Remember: I compute you!

rgracia’s picture

What I realize is that it seems like no matter if the new site is setup as a sub domain or as a folder, neither should have files in it, the settings.php and the htaccess reqrite rules should take care of the workings to display the correct database content? My problem is that I can't get the insstall.php to load when I visit the new subfolder, even though there's a settings.php for it. Is the htaccess the problem here?

rgracia’s picture

The documentation says this but it still doesn't work:

Sites do not have to have a different domain. You can also use sub domains and subdirectories for Drupal sites. For example, example.com, sub.example.com, and sub.example.com/site3 can all be defined as independent Drupal sites. The setup for a configuration such as this would look like the following:

sites/default/settings.php
sites/example.com/settings.php
sites/example.com.site3/settings.php
sites/sub.example.com/settings.php
sites/sub.example.com.site3/settings.php
sites/www.sub.example.com.site3/settings.php
sites/www.sub.example.com/settings.php

So in my case I have a subdomain (subdomain.mysite.com) setup with my host that I want to load a completely different drupal site, but my core drupal install is in my root (mysite.com) how do I make this work?

rogerpfaff’s picture

if you have a sub.example.com setup it should look like /sites/sub.example.com/settings.php

------------------------------------------------------
Remember: I compute you!

rgracia’s picture

Yes, that's exactly what it looks like right now, but when I browse to is I get an Address Not Found error. So somehow I am missing a step that is not outlined in the documentation.

JThan’s picture

subdomain.domain.com has to point to the same folder as domain.com

Then you should be able to call subdomain.domain.com/install.php

There is no need to move install.php.

rgracia’s picture

I will just have to end up installing a fresh Drupal in a subfolder for each subsite I need. None of the procedures outlined in the following links worked for me in order to share the core install with other sites and setting up with separate databases;

Main Multi-site Documentation:
http://drupal.org/getting-started/5/install/multi-site

cPanel Considerations (I am in a cPanel host service)
http://drupal.org/node/156720

I even tried this portion as I was also getting access denied errors:
http://drupal.org/node/125539

Nothing except setting up a brand new Drupal install for each site works at the moment. I am hosted at Midphase with a VPS package.

rgracia’s picture

Could anyone direct me to the correct way to add aliases via htaccess files? I am unable to do it via httpd.conf file on my current host? I am still completely unable to get multi-site setup to work on Midphase, anyone else out there been able to?

BradleyT’s picture

Drupal install is at var/www/html/landingpages/

Inside var/www/html/landingpages/sites/ I have
all/
all/themes/
all/modules/
default/
default/settings.php
sub1.domain.com/
sub1.domain.com/settings.php
sub2.domain.com/
sub2.domain.com/settings.php
sub3.domain.com/
sub3.domain.com/settings.php
www.domain2.com/
www.domain2.com/settings.php
www.domain3.com/
www.domain3.com/settings.php
www.domain4.com/
www.domain4.com/settings.php
www.domain4.com/
www.domain4.com/settings.php

Inside httpd.config every virtual host for the above sites has a document root of /var/www/html/landingpages

Going to www.domain4.com/install.php is what sets up the install for a new site. Haven't had any problems at all.

Sounds to me like you might be having issues because you can't edit your httpd file.

rgracia’s picture

Yes they won't allow me to. I guess that shuts down the option of multi-site with this host??

rgracia’s picture

got it finally sorted out following this article:

http://community.contractwebdevelopment.com/drupal-multisite-configurati...

It has everything that's missing for this topic in the Drupal.org documentation. Especially Multisite via symlinks part using shell access

rgracia’s picture

OK Drupal gurus, I am now up and running with two sub sites in multi-seite setup (via symlinks). Now I am running into the problem where none of the images I post --placed in the main site's files folder-- display at all on posts for the sub domain sites. I checked that HotLinks is disabled for the site so they should be able to share those images. Do I have to edit the htaccess file with additional rules?