Apache LocationMatch throws 500 and AddOutputFilterByType does nothing

Posted by tackleberry on Server Fault See other posts from Server Fault or by tackleberry
Published on 2012-03-30T09:56:41Z Indexed on 2012/03/30 11:32 UTC
Read the original article Hit count: 208

Filed under:
|

I need to add below directives to apache. But I get 500 when I add these lines.

<LocationMatch "^/assets/.*$">
Header unset ETag
FileETag None
# RFC says only cache for 1 year
ExpiresActive On
ExpiresDefault "access plus 1 year"
</LocationMatch>

Additionally response is not gzipped when I add:

AddOutputFilterByType DEFLATE text/html text/css application/javascript application/x-javascript

Apache version is: Server version: Apache/2.2.22 (Unix)

App: rails 3.2 app

When I checked response&request for gzip problem, I see that browser requested gzip:

Accept-Encoding gzip, deflate

but response not gzipped.

© Server Fault or respective owner

Related posts about apache2

Related posts about gzip