I hope there are some uber-server-gods out there who can bail me out of a situation.

Recently I opened a Web account (cPanel) on Bluehost, where I've been building my Drupal site. The path for my site is

/home/myuser/public_html/

(i.e., Drupal is installed in public_html). My site has been opening fine at www.mydomain.com/; all the DBs test OK and there have been no problems using Drupal or seeing pages.

This past week I moved a client's site to my account. The main site is HTML/PHP; a subdomain of the site is Drupal. The path for the client's main site - www.clientdomain.com - is

/home/myuser/public_html/clientuser

and the path for their Drupal site - sub.clientdomain.com - is

/home/myuser/public_html/subclientuser

Today I switched DNS to make the client's site on my account live. My ISP is not yet seeing the change, but the client's is. They are able to open their site at www.clientdomain.com and see the test page I put on the new side. (The Drupal subdomain is broken ... but one thing at a time. The main site is their first priority.)

Inside

/home/myuser/public_html

where my own Drupal installation is, lives an .htaccess file with a lot of Drupal goodies in it.

When this .htaccess file is called .htaccess, my site works and the client's site fails (403).

When I rename this file to something other than .htaccess, the client can see their site but my Drupal site is broken. (The homepage loads, but I get node errors for any link I click.)

So - I seem to have a choice: my site or theirs? Is there a way to resolve this conflict?

When I created www.clientdomain.com and sub.clientdomain.com on my account, I allowed cPanel to use the default directory path settings. I'm wondering if I should have done something different and, if so, what. The conventions on this account are very different from the Plesk server I am used to (and the client's site comes from the same place).

Also, I'm no .htaccess expert. So, any help would be appreciated! Thanks in advance.

Comments

kotul’s picture

now this is just a suggestion but have you tried moving your site so that you main folder for your drupal account is in /home/myuser/public_html/mypersonalsite then the clients site is in /home/myuser/public_html/clients_site I just glanced over your problem but thats what I would recommend

m.e.’s picture

I kind of have the impression that accounts on this server expect the main site to be inside public_html. I'm not sure what will happen if I push the account's primary domain down a level. (I'm not even sure whether this is a cPanel issue or an Apache one ... not familiar enough with either to be sure.) ??

matkeane’s picture

Hi,

I'm neither an uber-server-god nor a htaccess expert, but I think I can point you in the right direction.

Using the default htaccess file, Drupal tries to take over all the paths in /home/myuser/public_html, so your html site will break. When you remove the htaccess file, Drupal can no longer parse its paths correctly and so, as you saw, it breaks. For Drupal to happily co-exist with other files and folders, you need to add some lines to .htaccess telling it which paths to ignore, so that the other pages can be served. These links might help:

http://drupal.org/node/30334
http://drupial.com/content/install-drupal-subfolder

m.e.’s picture

And if it works, I'll let you know you're an uber-server-god after all. Thanks!

m.e.’s picture

Well, this didn't work after all, perhaps because I'm lousy at editing .htaccess files. What ended up working for me was to move my Drupal installation down a level so that it wasn't above any of the HTML sites. Then I did an .htaccess redirect from my primary domain to the Drupal site, in case anyone types in the primary domain name. This has worked really well so far and today I even managed to install another site running off the same Drupal installation (despite it being a subdomain of an entirely different domain).

kotul’s picture

So you did what I suggested a week ago?

m.e.’s picture

It was related to what you suggested but not exactly (unless I was misunderstanding what you suggested) ... essentially what I did was keep my primary domain at the level cPanel expects it to be, but I removed Drupal from it. I then made a lower level domain my Drupal site and made the primary domain redirect to it. This puts Drupal on an equal footing with the non-Drupal sites and seems to avoid the .htaccess issues of having Drupal on the primary domain for my account. I thought you were suggesting that my primary domain be moved down a level, which I'm not sure cPanel would have dealt with gracefully.