Sub-Domain Multisite Configuration Question
ephman - July 7, 2008 - 20:32
hello,
i'm a little lost. i've done a bit of searching but maybe from what i've read i'm just not getting it (which is most likely the case). i'm sure this is possible. i've setup a main site which is currently installed into the root directory, and would like to be able to run completely different sites off sub-domains (different database, different themes, etc...). is there a dummy proof step by step guide i can use?
here's my setup which i have complete control over:
drupal 6.2
ubuntu 8.04, Kernel 2.4.26
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.1 with Suhosin-Patch
PHP 5.2.4-2ubuntu5.1
MySQL 5.0.51a
thanks for your bandwidth,
ephman

For each subdomain, create a
For each subdomain, create a folder in /sites matching exactly the subdomain name. Create an empty database for each subdomain (or you can use table prefixes and keep everything in one database). Copy a clean settings.php into each folder, and then type that subdomain into your web browser. You will now see the Drupal install page. Configure as you like.
So now you will have all sites running on one Drupal install, with access to all themes and modules placed in the sites/all/themes and sites/all/modules folders. To have something available to only one of the subdomains, create a modules or themes folder in that subdomains sites folder, and put the stuff in there.
That should do it.
______________________________________________________________________________________________________
mybesinformatik.com - Drupal website development
thank you. ok so i followed
thank you. ok so i followed your instructions. simple enough. i made an empty database then i created the sub-domain in my server, no problems. i then created a folder for the sub-domain in the sites directory and copied the settings.php into the folder. when type the sub-domain into my browser i just get the index of the directory with the settings.php file listed, there is no install page. when i click on the settings.php all i get is a blank page. what do you mean by "clean settings.php"? i simply copied my settings.php file from the default directory. i have not 'touched' that file, so i assume it's clean. any suggestions?
thanks,
ephman
You need to use the
You need to use the settings.php file from the Drupal tar file. The one in the default folder has been modified by Drupal to point to that site's database. The one from the Drupal tar file is "clean". That should work then.
______________________________________________________________________________________________________
mybesinformatik.com - Drupal website development
thank you. i tried that,
thank you.
i tried that, assuming that's what clean mean (thanks for confirming). the file in the tar is actually named default.settings.php. still only listed the index, and then i tried to change the file name to just settings.php, and yet again still same issue. just to be clear, the file is located in drupal-6.2/sites/default? i looked at the permissions, and seem to be fine with root. and still have the same issue of only showing the index of the directory. tried other .php related pages, and things seemed to be fine.
thanks for your help,
ephraim.
install.php
Once you go to the subdomain, add install.php at the end to start the installation:
example
http//localhost/test/install.php
Make sure that the setting.php file is pointing to the new database. Hope this helps.
i changed the settings.php
i changed the settings.php file to point to the new database. when i tried your method of using the install.php file, http://subdomain.domain/install.php i get an internal server error 500, which i guess is good because it's proving i setup the subdomain properly at least. but alas, no avail. i've gone through these instructions suggested a few times, and i believe i'm following them properly. i just don't understand where i could be going wrong???
any other suggestions?
thanks,
ephman
Very odd. Have you tried
Very odd. Have you tried using default.settings.php (not settings.php) and then doing the install.php thing?
______________________________________________________________________________________________________
mybesinformatik.com - Drupal website development
yep. i've just banged my
yep. i've just banged my head over this.
thanks,
ephraim.
I was needing to do the multiple sites
I followed the instructions and got the same results as you, ephman.
What files are in the subdomain?
Drupal 6.x
Maybe this technique does not work for Drupal 6.x
on separate occasions i
on separate occasions i tried two different files only in the subdomain directory. first the settings.php file from the default directory. however i pointed the code to my new subdomain database. when that didn't work i decompressed drupal6.2 and took the default.settings.php file, and again pointed the file to the new subdomain database.
any clues? kind of glad to hear i'm not the only person with this issue, but still would love a solution. any help would be so appreciated!
thanks,
ephraim.
subdomain directory
I am speaking of the true subdomain directory and not the one under the drupal/sites directory. I have been busy, but plan to work on this some more. I have a little bit of an unusual setup in that the test domain that I am using has a website which uses PHP and uses phantom HTMl files. In the .htaccess file I transfer initial control to the drupal configuration and can access the PHP website and another PHP website in a separate subdomain via the drupal. I am only looking to use the drupal to create a possible front end for existing websites and to try to learn drupal. When I resolve this, I will let you know.
i have nothing in the true
i have nothing in the true subdomain. i was only using a directory within the drupal sites directory. any help would be really great thanks!
ephman.
Multisite Drupal
I believe the problem with the multisite setup is that I am running on shared hosting. To use Drupal, I have to have it as a directory under a domain. This being the case, I believe that this setup could not possibly work for multiple domains. In the case of subdomains, it might work, but I have not been able to determine how to setup my .htaccess file to use only one install of drupal. Since I am only wanting to test this, I am opting to install drupal as a directory under the subdomain also.
Solved. At least, it should be....
I have just gone through the steps of creating a multi-site setup in Drupal6, and it seems to be a little different than in Drupal5. Here are the exact steps I followed:
This has to work for you now. The only thing you have to be sure of is that the subdomain is pointing to your Drupal6 installation folder. In my case, I edited the Virtualhost setting for my main Drupal6 installation, and added sub.drupal6 as a ServerAlias. This is on my local test server, so I need to do all this manually. If you are on a shared hosting environment, use whatever control panel you have to point the subdomain to the same place as the main domain.
______________________________________________________________________________________________________
mybesinformatik.com - Drupal website development
i actually tried your method
i actually tried your method to the t a few days ago. great minds think alike. but when i go to http://subdomain.localhost/install.php i get an internal server error 500. now i know 100% my subdomain works fine. i can put whatever other html files in there and they render totally fine. now i don't have a special drupal site. sorry for this basic question but what do you mean by "I edited the Virtualhost setting for my main Drupal6 installation, and added sub.drupal6 as a ServerAlias." doesn't one already do that when they setup a subdomain?. i actually have full control over my server.
thanks,
ephraim.
It kind of depends on how
It kind of depends on how you setup the subdomain. If you use a control panel system like Plesk, Cpanel or Vdeck, then everything should be done for you and you shouldn't need to edit the Apache httpd.conf file (where the Virtualhost settings should be).
That error 500 implies that your site is there, but there's some config problem. This page, http://drupal.org/node/412, has some tips on fixing that. Could also be your php memory limit too (http://drupal.org/node/224106 and http://drupal.org/node/29268).
______________________________________________________________________________________________________
mybesinformatik.com - Drupal website development
ok i'm going to go through
ok i'm going to go through your suggestions. i doubt it's the php memory i've set it up there pretty high. i'm heading away for the weekend, so on monday when i get back i'm going to try some of these suggestions out. i really appreciate your help.
thanks,
ephman.
i setup the subdomain with
i setup the subdomain with webmin. and my subdomain settings are fine, i can put whatever i want in there and it works...
tried upping the php memory limits... no dice. as well as the htaccess file suggestion, didn't help either.
i upgraded to drupal 6.3, everything went smoothly, simple as pie. but still having the subdomain.localhost problem... looks like i'm getting ready to give up.
thanks,
ephman
Sorry to say, but I'm out of
Sorry to say, but I'm out of ideas. If this server is web accessible I could take a look at it if you want. If its only locally accessible, you could load some remote access software (http://logmein.com for example), if you want me to take a look at it.
______________________________________________________________________________________________________
mybesinformatik.com - Drupal website development
thank you anyways i really
thank you anyways i really appreciate it. your help was great! good karma back at ya.
thanks,
ephman
Instructions are missing an
Instructions are missing an important step. You have to park your subdomains at the parent domain location.
There's a few ways to do this, and they're all detailed here:
http://drupal.org/node/43816