Hi,
I am trying to create a multisite installation which has not been successful so far. This is what I have done.
I want to host 2 sites with drupal: example.com and sub.example.com
In ftp, in my document root there are 2 folders: example.com and sub.example.com
I've oploaded drupal 5.1 files in the document root, so outside the both mentioned folders.
I've copied settings.php 2x and put it in sites/example.com/settings.php and sites/sub.example.com/settings.php.
When I direct the browser to my domain and subdomain I get the "under construction" index page created by my provider IX Webhosting in both folders, so drupal is not activated at all.
I have installed drupal in the folder example.com as a single site configuration, this works, drupal is activated when I direct the browser to my domain. But I want to host multible sites with drupal and I do not want to install drupal for every site separatly in its own folder.
In a previous post CogRusty suggested that domains need to be pointed to the directory where drupal is installed. Since I host in Linux, I asked my provider about the posibility of symlinks, to point the index.htm which is in example.com and sub.example.com to drupal which is outsite these folders. I have not yet received and answer whether this is something they do.
I hope someone can help me with the following questions:
1- Have I installed drupal in the right place for a multisite configuration? Acording to my provider I have not, but they could not understand how a single installation of a cms can run multible sites, so I guess their knowledge in this erea is not all that.
2- If I have installed drupal in the right place why is it not working? If not what is a better way?
3- Would symlink be an solution to this situation?
Thank you so much for any suggestions and help!
Comments
=-=
There seems to be some confusion here. you don't need a sites/example.com/settings.php
example.com will be your root install and as such your settings.php will be in sites/default/
The first thing to get done, is to install your "main" drupal site at example.com. Then work on the subdomain with the multisite. Symlinks may be able to be created from your hosts admin panel , during the creating of subdomains. This is how my host works.
I have created
I have created sites/example.com/settings because drual had to be installed outside example.com or any other domain within a multi site configuration, this was at least my understanding from the install instructions.
You are saying I should not install drupal outside example.com folder?
At the moment I want to host example.com and sub.example.com, but in the long run there are going to be more sites: example2.com, example3.com, sub.example3.com etc. Do I then install drupal in for instance example.com folder and point it from there to the other sites?
BTW is there a limit to how many sites you can run with a single drupal installation?
=-=
Are you following these ? http://drupal.org/node/107347
you can run as many drupal sites off one installation as your host can take. The more sites you install the larger your DB becomes when installing into the same DB with prefixes.
Thanks VeryMisunderstood, I
Thanks VeryMisunderstood,
I did come accross that node and read it.
I feel that my problem lies prior to what is being describe there where is assumed that you have already installed drupal in the right place. I still have to figure out what the right place is in my situation before I can follow the described steps.
I would appriciate greaty if anyone can offer suggestions to my previous questions.
Thanks!
hi
1 - No, you havent installed drupal in the right place. You dont need those two folders. Install drupal in your document root folder.
3 - Yes, tell your provider to make your sub.example.com points to your document root folder. So, both example.com and sub.example.com should point in your document root
folder. And there is the place to install drupal.
hth
I guess my main confusion
I guess my main confusion lies with what the document root folder is.
This is how my hosting dir looks:
/.
example.com
sub.example.com
[all drupal folders and files]
The folders example.com and sub.eample.com are created by my isp, the browser resolves to them when I point it to the main or sub domain. I am assuming that when I register an other main domain, my isp will ad the folder example2.com in the dir.
If the above is not the right place for drupal, where then do I install it?
In the folder example.com? if so, how do I then tell it to go one level up fo find sub.example.com, example2.com etc.? It seems not logical though to install drupal in *one* of the site folders instead of at the same level as all the site folders in the dir.
I have been reading through loads of nodes and this is such basic stuff, yet it does not seem to be address anywhere. I really feel a simpleton.
Thanks for your reaction anyway!
=-=
Your document root or public root is where the browser resolves to when you point to yoursite.com. If the browser resolves to example.com, this is your public root. Thus Drupal should be installed in the example.com folder first. Then multisites are symlinked to the main drupal install, using sites/site2, sites/site3 so on so forth. As it stands, it seems you have Drupal files sitting above the public root, which is not correct.
"As it stands, it seems you
"As it stands, it seems you have Drupal files sitting above the public root, which is not correct."
Yes you are right in this, in my dir drupal files are above the folder the browser resolves to.
Would it then be correct to say that in a multisite configuration there is not *one* document root but that each site has its own document root?
If so is there any guiding rule on how to chooce which document root of the different sites is the best place to install drupal in? Or does it not matter in which document root drupal reside in as long as the pointers in settings.php are correctly applied?
Thanks VeryMisunderstood, your comment is really helpful!
=-=
No this would not be a correct statement. For mutisites, you have "ONE" document root, the public root where the browser resolves to when a user enters your main web address. What you are asking would be correct though, if when creating a subdomain, you actually stored files in it. You won't be doing that as you will be symlinking to the main drupal install.
Imagine this, you have a two site mutisite install.
yoursite.com (main drupal install) and sub.yoursite.com (multisite1)
yoursite.com (main drupal install) resolves perfectly well at yoursite.com (main drupal install)
sub.yoursite.com (multisite1) scans the sites/sub.yoursite.com/settings.php in the public root (main drupal install) for it's DB information, then uses the necessary files in yoursite.com (main drupal install) when symlinked properly for sub.yoursite.com (multisite1) to work properly.
What you need to do is get your first Drupal install in order and working.
Then follow the steps for the multisite install, which will run a second installation, where you will have to expand the "advanced" menu during installation and provide a table prefix. This is done so that both installation don't work off of teh same tables in the database. If you intend to share tables between both installations, you will have to inform settings.php of this. You will find an array in settings.php that will need to be set up.
Thanks VeryMisunderstood,
Thanks VeryMisunderstood, this is really illuminating!
I am going to follow what you say.
Just one more question. I can see that what you say about document root can apply to a main site and its subdomain. But does it allso apply to 2 main domains. Is there also "ONE" document root, namely yoursite.com, in the case of a multisite install of yoursite.com and yoursite2.com?
=-=
yes. In this case, just replace multisite1 with yoursite2.com in my example.