I've tried everything to get boost to work on my D7 sites but keep getting "Internal Server Error" when I put the code in the site's root .htaccess file. I used boost widely on D6 sites, but my servers are different now.
Here's a little more info in case it helps:
- I've tried nearly every combination in /admin/config/system/boost/htaccess
- I'm using a subdomain, so the site exists at subdomain.example.org
- I can see files added to appropriate subdirectories in /cache/*
- I've tried with and without "RewriteBase /"
- I've tried with and without the alternate "Options +SymLinksIfOwnerMatch"
- I've added "Options +SymLinksIfOwnerMatch" to cache/normal/example.org/.htaccess
- Not sure whether PHP disable_functions has to do with this, but I've tried removing those temporarily without success
Lastly, perhaps this deserves a separate issue, but regarding the line at the bottom of /admin/config/system/boost/htaccess/generator:
"Note that the generated rules' settings can be configure (sic) at admin/config/development/performance/boost/htaccess-settings."
Based on the path, it would appear that this is a boost performance page, but it's identical to the Drupal performance page. Indeed, updating either one with different settings affects the other, yet the paths are different. So I'm confused about that, too.
Comments
Comment #1
michael.k commentedAnyone? I'm sorry but I just can't get this module to work.
Comment #2
bgm commentedDo you have access to your Apache error log? It should provide more information on the error.
Comment #3
Anonymous (not verified) commentedWhat happens if you remove
cache/normal/example.org/.htaccess
and all other .htaccess files in the cache ?
are Apache 2.2 core directives, but maybe something is not right with the server configuration and it's not the root .htaccess causing the problems. Also +Symlinks is needed for mod_rewrite to work, take it out and you will get a 500 even with no symlinks on the server. You have the path to a generated cache file, so why not visit it directly and see if you still experience an error e.g. cache/normal/subdomain.example.org/node/1.html which you can get from the directory structure which may help eliminate some of the variables in debugging.
Comment #4
michael.k commentedThank you bgm and Philip_Clarke for your replies, both of which helped me to solve this issue.
I deleted all the .htaccess files that were in the site's cache directories (created upon saving at admin/config/system/boost/filesystem), but no change.
The error in the Apache error log gave me the critical clue:
~/.htaccess: RewriteCond: bad argument line '%{REQUEST_URI}'Now, after a zillion cut-and-paste tests with .htaccess, I could zero in on the lines with %{REQUEST_URI}, which helped me realize that one long line was split! It turns out that pasting with nano forces soft returns for lines that exceed the shell's width, so long lines become broken code. One has to expand a window to a wide enough width to paste everything without modification.
So this line:
Became this:
I am now happily seeing anonymous page requests build .htm files in the cache directories, and my performance increase is now simply awesome!
Many thanks for this module!
Comment #6
sco_tt commentedThanks Michael, I was about 1/4 of a zillion cut and pastes using nano when I discovered your post!
Comment #7
sustainablesolutionsnz commentedThis worked. It was driving me nuts, but now boost is finally working and server response according to pagespeed insights is 200ms faster.
Comment #8
Anonymous (not verified) commented...but the .htaccess files will regenerate (cron run, cache flush) at some point so the error needs to be diagnosed. It's most likely to be that the file needs FollowSymLinksIfOwnerMatch instead of Symlinks, which should be available in the dev version of boost.
Comment #9
sustainablesolutionsnz commentedYup, found that out, and just figured out that it was the symlinks issue which i remedied and was about to post on.
Comment #10
sustainablesolutionsnz commentedAt the risk of going off topic, I have changed symlinks to FollowSymLinksIfOwnerMatch in the problem htaccess file. Even with file permissions to 444, it is still being rewritten to to symlinks every few hours and giving error 500 for anonymous users. Any ideas?
Comment #11
Anonymous (not verified) commentedif boost dev does not have the option, (4 quotes up) then I need to change the dev version.