Like what you're reading? Want to get rid of ads? Donate some BTC and help me stop relying on AdSense. BTC Address: 1E4TGB9e4mwfUusg4XHnte1Szi1gDFWDd9
Apache 2.4 and 500 Errors in Htaccess
I upgraded my main server from Ubuntu 12.04 to 14.04 yesterday and after the upgrade Apache didn’t want to serve anything but 500 errors. Turns out that Ubuntu 14.04 brings with it an upgrade to Apache 2.4 (used to be 2.2). One of many issues were errors stemming from .htaccess files. Here’s how to fix those.
I copied a lot of my htaccess files directly from the HTML5 Boilerplate project. Turns out that’s not the best idea if you run Apache 2.4. If you’re looking at your error logs and seeing something about a filter chain, the issue is a new syntax for mod_filter. Look for the line in your .htaccess file that starts with <IfModule filter_module>. Replace that whole block with this:
It’s exactly the same thing as before, just updated to use the new syntax. There’s yet another Apache module you can use to switch between the different syntaxes but I’d prefer not to run anything more than I really need.