Hi people,

I have tried installing Drupal for a single domain nd its working and running. Right now, I want to do a clean multi site install for 3 domains. Heres the general idea:

domain1.com
domain2.com
domain3.com

Basically what i want to create is an independent drupal installation and not within a directory of my 1st domain and setting up the multi site installation from there.

As I am using Netfirms, the root directory is set like this:

/www/domainX.com (x=1/2/3)

1st Qns:
Is it possible to install the drupal files on the main www directory: /www/drupal
and not installing it under /www/domain1.com
How is possible for me to even run installation on say domain1.com, domain2.com, domain3.com?

2nd Qns:
If its not possible for me to install under the /www/drupal directory, lets say i install it under /www/domain1.com/drupal,
How do i redirect the page shown on http://domain1.com/drupal to be redirected to http://domain.com

I understand that these questions are really noob but I have not managed to find an answer addressing this, thus thanks in advance and your help is deeply appreciated!

cheers

Comments

simul’s picture

1) downlaod drupal and unzip it to /www/drupal
2) under /www/drupal/sites create 3 directories, www.domain1.com, www.domain2.com, www.domain3.com
3) make a copy of /www/drupal/sites/default/settings.php in each of the 3 directories you created in step 2)
4) IMPORTANT: ask your host to "make all my domains to point to the same place: /www/drupal"

5) go to each of your domains (in your browser) and run the installation.

here is a longer story about step 4)

Each domain name has an place in the file system too look for the files. Right now you have
www.domain1.com -> /www/domain1
www.domain2.com -> /www/domain2
www.domain3.com -> /www/domain3

e.g if a user ask for www.domain1.com/index.html then the webserver look for the file /www/domain1/index.html and send back to the browser

This should be changed into:

www.domain1.com -> /www/drupal
www.domain2.com -> /www/drupal
www.domain3.com -> /www/drupal

Now if user ask for www.domain1.com, webserver look in /www/drupal
Drupal , look at the request (www.domain1.com) and goes to /sites/www.domain1.com, find the setting file (which database ... etc) and give back the response

Hope it's clear

oliverstone’s picture

Thanks thats great and clear. I have folowed your method and manage to get domain1 up and running. However domain2 hit a snag. Heres the following error:

* To start over, you must empty your existing database.
* To install to a different database, edit the appropriate settings.php file in the sites folder.
* To upgrade an existing installation, proceed to the update script.

So with regards to the installation on domains 2 & 3, do i just need to edit the settings.php?
Heres what I have done with regards to Step 4:

I just need to forward the domain to the root drupal folder and thats it?

e.g. instead of pointing to the current public location:
/www/domain1.com/
/www/domain2.com/
/www/domain3.com/

I just need to give a new forwarding location e.g.:
/www/drupal/site/domain1.com/
/www/drupal/site/domain2.com/
/www/drupal/site/domain3.com/

and install each domain by pointing to the same base url as I would on a single installation e.g.:
http://domainX.com/ or http://domainX.com/install.php

Theres no need for me to fiddle around with symlink or change the "$base_url = " under settings.php for each individual domain. Lastly, each domain would have its own .htaccess file saved under /www/drupal/site/domainX.com/files/

Cheers

simul’s picture

the new forwarding location should be on the root of drupal installation. In your case

/www/drupal

and NOT

/www/drupal/sites/domain1.com
/www/drupal/sites/domain2.com
/www/drupal/sites/domain3.com

and install each domain by pointing to the same base url as I would on a single installation e.g.:
http://domainX.com/

yes

Theres no need for me to fiddle around with symlink

Not in your case. That is used when you create multisting with subdomains (i.e. sub1.domain.com, sub2.domain.com etc)

"$base_url = " under settings.php for each individual domain

I'm not sure about that.. I think the installation process takes care of it... I mean I know it changes the database settings and so.. but not sure about base_url. U have to check it out

hope it helps

oliverstone’s picture

Sorry for the previous comment, no idea why its not updated, anyway my new forwarding location for all 3 domains are pointed towards:
/www/drupal/

Domain1 is up and running, however, theres still some problems with the installation:

For domain2, what happens is that the installation was successful, i manage to change the settings.php and point it to a new Database etc. All the inital Netfirm provided index.html files have been deleted. But when I try accessing the Drupal Log-in page e.g.

http://domain2.com --->Solved, shown the default drupal log-in page
but
http://www.domain2.com

instead of the drupal log-in page, I am shown Netfirms Default "Future Website/Construction Page"
One thing to take note is that Domain2.com is the initial domain i registered with Netfirms Hosting Program, and thus i believe thats the reason behind the default Netfirms page.

I have tried renaming
/www/drupal/sites/domain2.com to /www/drupal/sites/www.domain2.com
and also uncommenting & editing the $base_url = "http://www.domain2.com"
but the same problem still exists.

Is there anything else i could try or is this something that only Netfirms can solve?

simul’s picture

***

simul’s picture

***