Download & Extend

Boost .htaccess disables multisite install

Project:Boost
Version:5.x-1.0
Component:Apache integration
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Running Boost on 5.7 install with two sites, exampleA.com and exampleB.com on the same server using WHM/CPanel domain parking to enable the drupal multi-site install. ExampleA.com is the primary domain and the name of the DNS server is ns1.exampleA.com.

The multisite works fine until the new .htaccess file for Boost is installed in the root level of exampleA.com. Boost works great, begins caching pages for exampleA.com. But when I type exampleB.com into the address bar, the index page for exampleA.com comes up. The only way that I can get into ExampleB.com is to type exampleB.com/node or exampleB.com/user into the address bar. Still. when I click any "Back to Home" link on exampleB.com I'm taken to the home page of exampleA.com.

To recreate do this on your own site:
Install Boost on exampleA.com
Install .htaccess file
Go to exampleA.com
Go to exampleB.com

Would it help to install the .htaccess file in the sites/exampleA.com and sites/exampleB.com folders instead of the root folder?

Server specs: Linux, Apache 1.3.39 (Unix), PHP 5.2.0, Mysql 4.1.22-standard, cPanel X v2.6.0.

Comments

#1

I am interested in this too.
Following.

#2

subscribe

#3

Replacing instances of %{SERVER_NAME} with %{HTTP_HOST} solved this issue for me.

#4

Status:active» needs review

Attached is a patch that implements the comment in #3

AttachmentSize
boost-multisite.patch 1.65 KB

#5

Hi

Thanks for the patch, but when i apply it, i get the following error:

Fatal error: Call to undefined function drupal_get_normal_path() in /home/virtual/drupal5c.com/sites/all/modules/cache/boost/boost.module on line 13

#6

A cheap guess, but why do you have the boost folder in a folder called cache?

#7

We have the modules divided into folders, admin modules, cache modules, and so on.
We have a multisite install with *some* modules, and this way is more manageable.

Do you mean that this can produce problems?

#8

Status:needs review» active

Anyone can provide a clue to fix this?

Thanks!!

#9

Subscribing

#10

Also interested. Thanks.

#11

#3 has to do with the rewrite rules you place in your .htaccess file. Also #454652: Looking for a co-maintainer - 5.x.

#12

#5 - are you running a special homepage (front module) or something like that? I'm getting the same error and wonder if its that module. It's also an int'l site.

#13

It has been a while, but nope, I was not using front module or nothing *strange* for homepage.

#14

Status:active» closed (fixed)

Closing all 5.x issues; will only reevaluate if someone steps up #454652: Looking for a co-maintainer - 5.x

Reason is 6.x has 10x as many users as 5.x; also last 5.x dev was over a year ago. The 5.x issue queue needs to go.

#15

It's been a long time since this thread was opened (and closed) but I believe that I have a solution for those who come here with the same problem, as I did.

One possible cause is that Boost has cached an erroneous homepage for b.example.com, even after the patch for HTTP_HOST. How does this happen? Here's how.

- decide to run multisite setup with Boost.
- set up a.example.com with Boost. All working fine.
- set up DNS, a new site in Apache and a broken Drupal for b.example.com. Boost is off.

How is it broken? You may have:
- neglected to create settings.php,
- corrupt or badly configured settings.php.

- make a request for b.example.com
- Apache gets the request and hands it off to Drupal. Through the magic of the way Drupal handles multisite, the homepage of a.example.com gets displayed because b.example.com is broken. (I think this is what happens)
- Boost caches the homepage of a.example.com with the hostname b.example.com as it is the HTTP_HOST.

- You finally get your act together and fix up settings.php and b.example.com works... all except the homepage which is being served from Boost cache. Try going to b.example.com?doh to see that the site really does work for b.example.com. To confirm, go to /cache/normal/b.example.com/_.html and take a look at it.

How to fix it? Just going into /cache/normal and remove the b.example.com directory.

Hope that helps. It may avoid a night of restless sleep :)