View Full Version : Multiple CMS's side by side?
coryd218
06-18-2007, 10:45 AM
Okay...i'm finding that setting up multiple CMS's is rather tough. The problem that i'm having comes from the .htaccess file, i believe.
Here's what i'm trying to do...I have 4 domains for my shared hosting account.
- Site 1 is my primary domain name and i'd like to set it up using drupal
- Site 2 is an addon domain and I would like to use joomla
- Site 3 is an addon domain I want to use ELGG
- Site 4 is a parked domain that will also utilize the drupal install
Now here's the problem. If I setup drupal for my primary domain, it modifies the root .htaccess file. When trying to install ELGG CMS into my /public_html/site3 folder, i get errors. If i delete the root level .htaccess file, the ELGG install works fine. (This problem also applies to Joomla)
What i would like to do, is install all 3 CMS's, but I don't want any of them running from the root directory. I'd rather run them all from a subdirectory. If I was to setup drupal into a /public_html/site1 folder, how could I point my primary domain to this folder? Also, how would this affect Site 4, the parked domain? If drupal was setup in the root directory, the Site 4 (the parked domain) automatically looks for the /sites/site4.com folder. But if it's not installed in the root directory, this folder will now be in /site1/sites/.
Any help or ideas is greatly appreciated.
Is this the best way to do this or is there another way?
digiblur
06-18-2007, 11:24 AM
Okay...i'm finding that setting up multiple CMS's is rather tough. The problem that i'm having comes from the .htaccess file, i believe.
Here's what i'm trying to do...I have 4 domains for my shared hosting account.
- Site 1 is my primary domain name and i'd like to set it up using drupal
- Site 2 is an addon domain and I would like to use joomla
- Site 3 is an addon domain I want to use ELGG
- Site 4 is a parked domain that will also utilize the drupal install
Now here's the problem. If I setup drupal for my primary domain, it modifies the root .htaccess file. When trying to install ELGG CMS into my /public_html/site3 folder, i get errors. If i delete the root level .htaccess file, the ELGG install works fine. (This problem also applies to Joomla)
What i would like to do, is install all 3 CMS's, but I don't want any of them running from the root directory. I'd rather run them all from a subdirectory. If I was to setup drupal into a /public_html/site1 folder, how could I point my primary domain to this folder? Also, how would this affect Site 4, the parked domain? If drupal was setup in the root directory, the Site 4 (the parked domain) automatically looks for the /sites/site4.com folder. But if it's not installed in the root directory, this folder will now be in /site1/sites/.
Any help or ideas is greatly appreciated.
Is this the best way to do this or is there another way?
Not sure why you are having this problem as I run several CMS's like you explain with no issues. Put their respective .htaccess files in each CMS's folder.
coryd218
06-18-2007, 11:57 AM
This is what i'm trying to do is run them out of a subdirectory. but how do i run my primary domain via a CMS if it's not installed in the root directory?
sjlplat
06-18-2007, 12:00 PM
If I was to setup drupal into a /public_html/site1 folder, how could I point my primary domain to this folder?
You can achieve this with .htaccess redirects.
In your public_html file, place an .htaccess file containing the following code to redirect visitors to your new site location:
Redirect 301 /index.html http://www.yourdomain.com/your_directory/
Also, how would this affect Site 4, the parked domain? If drupal was setup in the root directory, the Site 4 (the parked domain) automatically looks for the /sites/site4.com folder. But if it's not installed in the root directory, this folder will now be in /site1/sites/.
Separate directories will not affect one another. The .htaccess file in the public_html directory will automatically send users to your specified location.
sjlplat
06-18-2007, 12:09 PM
Here's an alternative, and more comprehensive .htaccess redirect from the bluehost forums:
# Turn on rewrites.
RewriteEngine on
# Only apply to URLs on this domain
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
# Only apply to URLs that aren't already under folder.
RewriteCond %{REQUEST_URI} !^/folder/
# Don't apply to URLs that go to existing files or folders.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all those to insert /folder.
RewriteRule ^(.*)$ /folder/$1
# Also redirect the root folder.
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteRule ^(/)?$ folder/index.php [L]
The directories and file names need to reflect the ones for your websites, but this is a very good way to do it.
coryd218
06-18-2007, 12:12 PM
i'll try the .htaccess redirect for the initial issue.
however your response to the affect of Site 4 is unclear. When you want to run multiple sites within a single drupal install, it is able to redirect the request to the appropriate site, based on domains listed within the sites folder. If Drupal is installed in a sub-directory the the /sites folder will not exist. It would be /site1/sites. Inside this sites folder would be site4.com.
If drupal was installed in the root directory, the request for site4 would simply pull up the /sites/site4.com, thanks to the way drupal is configured.
So what do i need to do to make sure site 4 gets to where it needs to go? Do i have to do an .htaccess redirect for all of them? Or since the domain is parked, it will simply go to the /site1 directory and be able to use the drupal configuration from there?
sjlplat
06-18-2007, 12:15 PM
I haven't used Drupal, so let me install a couple copies in some dummy directories and I'll give you a solution.
coryd218
06-18-2007, 12:21 PM
I haven't used Drupal, so let me install a couple copies in some dummy directories and I'll give you a solution.
if you do that, you're the man!
sjlplat
06-18-2007, 12:29 PM
if you do that, you're the man!
I used Fantastico to successfully install Drupal in 2 separate directories with 2 separate addon domains. Looks to be working perfectly for me. There were no extra directories created under root.
I created a 3rd install in a directory under domain 1, and it's all working fine.
I think your best bet is to create a separate install for each directory, rather than trying to use the same install for multiple directories. 1 extra installation of Drupal isn't going to use any significant amount of your available webspace. If you're concerned with having the same layout across both installs, copy the appropriate database tables from one site database to the other.
coryd218
06-18-2007, 12:40 PM
Thanks for doing that...however, I am wanting to run multiple domains via one drupal install, using a parked domain. the thing with creating a separate install is that the "4" domains example i use is just an abbreviated version of what i'm doing.
i actually am running 9 different domains on drupal and don't want 9 separate installs. if i only had two, this might be feasible.
sjlplat
06-18-2007, 12:43 PM
Thanks for doing that...however, I am wanting to run multiple domains via one drupal install, using a parked domain.
I don't think you can do this with the site locations you have selected. You will have to use Drupal in your root directory.
Unfortunately, I don't see that you can use the same install across multiple directories without using root.
Let me install ELGG and Joomla under my Drupal install and see if I can resolve any conflicts.
coryd218
06-18-2007, 12:45 PM
thx for looking into this. i had it working at one point but moved hosts and now for whatever reason can't get it to work.
sjlplat
06-18-2007, 12:55 PM
I've got Joomla and Drupal running now. Working on the ELGG install. Will take a little longer with the upload and config for ELGG.
coryd218
06-18-2007, 01:02 PM
yeah ELGG is a bit tougher install. I've got a post on drupal.org in regards to this question as well.
thx for all your help man!
sjlplat
06-18-2007, 01:32 PM
Well, sadly I don't see any problems at all so I'm not sure how I can help you. I've got fresh installs of Drupal in the root directory, Joomla in a subdirectory, and ELGG in a subdirectory. All of them work flawlessly.
You can view the sites at
http://www.chopthis.com - Drupal install
http://www.chopthis.com/joomla/ - Joomla install
http://www.chopthis.com/elgg/ - ELGG install
Maybe if you post the errors you're experiencing, I can help narrow down the problem.
coryd218
06-18-2007, 01:44 PM
this is very very depressing...lol.
coryd218
06-18-2007, 01:45 PM
during your elgg configuration, could you list what you did for each step?
sjlplat
06-18-2007, 01:47 PM
this is very very depressing...lol.
On a positive note, you can install all 3 CMS scripts together. Now it's just a matter of finding the source of your errors. :)
during your elgg configuration, could you list what you did for each step?
For my ELGG install, I followed the instructions in the INSTALL file. The only problem I ran into was setting up the database, as I forgot to append my account name to the database info. You might double check your dataroot directory. That was a little confusing, as it stores session data locally rather than in the server default.
This section I had to read a few times. You should probably use a directory below public_html for this, unlike I did in my install:
// dataroot. this is where uploaded files will go (and sessions for now)
// This should be OUTSIDE your wwwroot.
// NB: **MUST** have a final slash at the end
$CFG->dataroot = '/home/my_username/public_html/chopthis/elgg/uploads/';
coryd218
06-18-2007, 01:53 PM
well, hostmonster just reset my account, since i'm rebuilding from the ground up. the first time i went through the install processes was a learning experience, so maybe something got messed up along the way. :crossesfingers:
Although with that said, i don't know if i like the idea of having myself tied into one particular CMS for my primary domain. Could cause problems if i ever decided to switchover.
hopefully i can find a way to make it work by installing each CMS in it's own folder and still be capable of hosting multiple sites with each.
Nonetheless...i can't thank you enough.
sjlplat
06-18-2007, 01:58 PM
Although with that said, i don't know if i like the idea of having myself tied into one particular CMS for my primary domain. Could cause problems if i ever decided to switchover.
I don't think this would be a problem. With the exception of .htaccess, a website in the root directory will work independently of sites in subdirectories, and vise-versa. Any problems that arise from installing a new CMS in the root directory would not affect any subdirectories, aside from the ones that rely on the CMS in root.
Probably the easiest way to ensure independence would be to install Drupal in root, and use addon domains for each separate install. This would ensure that your Drupal install can remain unchanged, while you would be free to change any addon domain without affecting the others.
coryd218
06-18-2007, 02:09 PM
but doesn't the root level .htaccess file have bearing on sub-directories as well?
this caused my first issue. i installed elgg in a sub directory and it only worked when nothing was in the root level .htaccess file.
also, if i wanted my primary domain to all of a sudden run out of Joomla! i have to weed through all the stuff that the drupal install put inside of my root level .htaccess file and configure my primary domain to point to the joomla install.
i just don't like the idea of having .htaccess settings for my drupal install possibly conflicting with any subdirectories.
sjlplat
06-18-2007, 02:15 PM
but doesn't the root level .htaccess file have bearing on sub-directories as well?
this caused my first issue. i installed elgg in a sub directory and it only worked when nothing was in the root level .htaccess file.
also, if i wanted my primary domain to all of a sudden run out of Joomla! i have to weed through all the stuff that the drupal install put inside of my root level .htaccess file and configure my primary domain to point to the joomla install.
i just don't like the idea of having .htaccess settings for my drupal install possibly conflicting with any subdirectories.
If the installs work as they did for me, there shouldn't be any .htaccess conflicts. Unless you've added something to the Drupal .htaccess file, I don't see that any issues would arise. Adding an .htaccess file in each subdirectory would override the root .htaccess file, provided you specify exactly how you want .htaccess to act.
coryd218
06-18-2007, 07:07 PM
question for you...is there a possibility i could do the following?
- create a Drupal, WordPress, Joomla, and ELGG subdirectory
- Point my domain to the appropriate CMS directory based on the one it will use
sjlplat
06-18-2007, 08:38 PM
With some creative scripting, I think that would be possible. I doubt a simple redirect would be sufficient though.
coryd218
06-19-2007, 06:13 AM
i got it all figured out.
I was able to create a wordpress, drupal, joomla, and elgg directory and have all my sites point to the appropriate subdirectory.
i simply setup each subdomain to point to their CMS directory, in which case the CMS would handles multiple sites as it normally would.
Thanks for all your help. If anyone has any additional questions about how I accomplished this, just let me know.
Thanks,
Cory
sjlplat
06-19-2007, 10:12 AM
i got it all figured out.
I was able to create a wordpress, drupal, joomla, and elgg directory and have all my sites point to the appropriate subdirectory.
i simply setup each subdomain to point to their CMS directory, in which case the CMS would handles multiple sites as it normally would.
Thanks for all your help. If anyone has any additional questions about how I accomplished this, just let me know.
Thanks,
Cory
Cool! That'll make things a lot easier. :)
asethi
06-20-2007, 09:46 PM
I am starting off and having a similar problem. I found the redirect script from the helpdesk tickets to redirect the main domain into a subdomain and I installed that and created a subdirectory.
The problem is where do you install Drupal the first time? It asks for a directory off the root directory of the domain! And I can only assume it is not reading the .htaccess file to redirect it!
So that is the problem for the installation of any scripts if you are trying to redirect the main domain.
asethi
06-20-2007, 09:56 PM
We have screwed it up because hostmonster wants to default to the main directory for the primary domain!
I can install drupal in a subdirectory and do the domain redirects to get the user to the subdirectory. The problem is the user will always have the subdirectory URL showing:
primarydomain.com/drupal/index.php
so that kind of sucks, other than that i guess things should work fine.
Any quick fix for this or is it just not worth it?
sjlplat
06-21-2007, 09:00 AM
You can use a frameset to force the URL bar to show the main address, but it's basically a bandaid and I wouldn't recommend it.
There was also a browser-wide exploit that was capable of showing a fake URL, but it has since been patched in all the newest browsers.
As far as I know, these are the only two methods to do what you are looking for.
coryd218
06-21-2007, 10:33 AM
try and use your .htaccess file to do a URL Mapping. You will be at yourdomain.com/drupal/index.php but the mapping will display yourdomain.com.
-or-
you could also make it to where your primary domain points to the drupal install. from there drupal will take over. create a folder in your sites folder called "yourdomain.com" - without the quotes of course. Right now, i'm assuming you are running your primary site from the sites/default folder.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.