tell lighttpd to add to gzip files content-encoding header

so users get it as text/plain
This commit is contained in:
Miroslav Suchý 2015-05-01 22:41:56 +00:00
parent f4e932c2c0
commit 0d15b02397
2 changed files with 7 additions and 2 deletions

View file

@ -76,6 +76,10 @@ var.socket_dir = home_dir + "/sockets"
##
## Load the modules.
include "modules.conf"
server.modules = (
"mod_access",
"mod_setenv",
)
##
#######################################################################
@ -456,6 +460,7 @@ $SERVER["socket"] == ":443" {
ssl.cipher-list = "ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM"
}
include "conf.d/compress.conf"
$HTTP["url"] =~ "\.log\.gz$" {
setenv.add-response-header = ( "Content-Encoding" => "gzip")
mimetype.assign = ("" => "text/plain" )

View file

@ -4,9 +4,10 @@ config_opts['plugin_conf']['package_state_enable'] = False
config_opts['plugin_conf']['ccache_enable'] = False
config_opts['plugin_conf']['yum_cache_enable'] = True
config_opts['plugin_conf']['yum_cache_opts'] = {}
config_opts['plugin_conf']['yum_cache_opts']['max_age_days'] = 150
config_opts['plugin_conf']['yum_cache_opts']['max_metadata_age_days'] = 150
config_opts['plugin_conf']['yum_cache_opts']['dir'] = %(cache_topdir)s/%(root)s/%(package_manager)s_cache/"
config_opts['plugin_conf']['yum_cache_opts']['target_dir'] = "/var/cache/%(package_manager)s/"
config_opts['plugin_conf']['root_cache_enable'] = False
config_opts['plugin_conf']['root_cache_opts']['age_check'] = False
@ -14,5 +15,4 @@ config_opts['plugin_conf']['root_cache_opts']['age_check'] = False
config_opts['plugin_conf']['bind_mount_enable'] = False
config_opts['plugin_conf']['compress_logs_enable'] = True
config_opts['plugin_conf']['compress_logs_opts'] = {}
config_opts['plugin_conf']['compress_logs_opts']['command'] = "/usr/bin/gzip -9 --force"