0

I installed the Boost module in my site. The site is running on multisite configuration having subdomains like

http://site1.example.com

http://site2.example.com

http://site3.example.com

http://site4.example.com

After enabling the Boost module in all subdomains. And also edited the .htaccess rule generated for a subdomain.

in the document root www.example.com/public_html/cache/normal i can see 4 directories and relevant cached pages for each sub domains inside these directories site1.example.com site2.example.com site3.example.com site4.example.com

But cannot see the boost comment at the end of page in any subdomain. In short I would say "Boost module is not working". Am I doing right boost configuration for multisite configuration. Actually I don't know what extra stuffs is needed for boost to work in multisite configuration

here is my .htaccess generated rule for each subdomain placed in .htaccess file in root folder

  ### BOOST START ###

  # Allow for alt paths to be set via htaccess rules; allows for cached variants (future mobile support)
  RewriteRule .* - [E=boostpath:normal]

  # Caching for anonymous users
  # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
  RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
  RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add|comment/reply))|(/(edit|user|user/(login|password|register))$) [OR]
  RewriteCond %{HTTPS} on [OR]
  RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
  RewriteCond %{ENV:REDIRECT_STATUS} 200
  RewriteRule .* - [S=3]

  # GZIP
  RewriteCond %{HTTP:Accept-encoding} !gzip
  RewriteRule .* - [S=1]
  RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
  RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html,E=no-gzip:1]

  # NORMAL
  RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html -s
  RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

  ### BOOST END ###
2

Boost works out of the box with multi-site. If your cache files are being generated (they appear in /cache/normal/site1.example.org/), but not served (boost comment in the footer of the page, or X-Cached-By in the HTTP headers), then there is an issue with your .htaccess configuration.

You can debug your htaccess rules by enabling the rewrite log:

RewriteLog "/tmp/rewrite.log"
RewriteLogLevel 2

This can generate a lot of logs, use with great care in production.

Also check this post on how to debug htaccess rules:
https://stackoverflow.com/questions/9153262/tips-for-debugging-htaccess-rewrite-rules

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.