0

I'm having a somewhat bizarre issue - We've been trying to optimize this Drupal 7 site by setting up...quite a bit of caching (memcache, apc, boost, varnish, etc) - We then tried to disable Varnish since it didn't seem to be working anyway and Boost managed to get the site working well enough.

Now, for some reason, any page request that isn't cached -- for example, if you click a link to the "About Us" page at the top, which is not cached -- it doesn't actually navigate to the page. Instead, it tries to download a file called "about-us" with no extension and the contents are the same as the siteroot's index.php file. Any page that IS cached (such as the Events page) is served up but none of the JavaScript is loading.

EDIT: Furthermore, I can't login to the backend to make any changes to the modules or tweak settings because browsing to /user or /admin just downloads a "user" or "admin" file like stated above >< - Also, the Cached pages include "X-Cached-By: Boost" in the header while the broken pages obviously do not.

ANOTHER EDIT: I manually went into the Database and set the Status for the Boost module in "system" to 0 - I then went into the .htaccess file and commented out all the Boost stuff. This changed nothing on the site, so the problem might not just be with Boost. I'm slowly running out of hair to pull out ><

I'm at something of a loss on this, anyone have any tips? Here's some of the settings.php and .htaccess stuff:

### settings.php ####

# Memcache
include_once('./includes/cache.inc');
include_once('./sites/all/modules/memcache/memcache.inc');
$conf['cache_default_class'] = 'MemCacheDrupal';

# APC
$conf['cache_backends'] = array('sites/all/modules/apc/drupal_apc_cache.inc');
$conf['cache_class_cache'] = 'DrupalAPCCache';
$conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache';

# Varnish - Disabled
#$conf['cache_backends'] = array('sites/all/modules/varnish/varnish.cache.inc');
#$conf['cache_class_cache_page'] = 'VarnishCache';
#$conf['page_cache_invoke_hooks'] = false;
#$conf['reverse_proxy'] = true;
#$conf['cache'] = 1;
#$conf['cache_lifetime'] = 0;
#$conf['page_cache_maximum_age'] = 21600;
#$conf['reverse_proxy_header'] = 'HTTP_X_FORWARDED_FOR';
#$conf['reverse_proxy_addresses'] = array('127.0.0.1');
#$conf['omit_vary_cookie'] = true;

### .htaccess ####

### 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=7]

# GZIP
RewriteCond %{HTTP:Accept-encoding} !gzip
RewriteRule .* - [S=3]
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]
RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.xml -s
RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.xml [L,T=text/xml,E=no-gzip:1]
RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.json -s
RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.json [L,T=text/javascript,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]
RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.xml -s
RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.xml [L,T=text/xml]
RewriteCond %{DOCUMENT_ROOT}/cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.json -s
RewriteRule .* cache/%{ENV:boostpath}/%{HTTP_HOST}%{REQUEST_URI}_%{QUERY_STRING}\.json [L,T=text/javascript]

### BOOST END ###
  • Can you provide a snapshot of the headers for the HTTP response? – Lester Peabody Oct 16 '12 at 17:50
  • Go and download drupal and replace your current .htaccess file with the default drupal one. This sounds like your .htaccess file got a typo in it accidentally. – mikeytown2 Oct 30 '12 at 23:12

Your Answer

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

Browse other questions tagged or ask your own question.