How can I get Apache 2.2 on Centos to serve static .html.gz files from local disk to browsers, without them being prompted to download the file (ie - I want it rendered normally in the browser)?
How can I get Apache 2.2 on Centos to serve static .html.gz files from local disk to browsers, without them being prompted to download the file (ie - I want it rendered normally in the browser)?
Try this:
Use the following:
Make sure mod_negotiation, mod_deflate, and mod_mime are loaded elsewhere in the config. They should be standard. On my CentOS install, it appears the AddEncoding line is present but commented out. Just uncommenting that line may be sufficient.
It's a good idea to limit the scope of this setting - as it may result in .gz files being served as content-encoded everywhere, even when you want to send them as a download.