From 08994deb1f2a11e288848fd7f821569830412c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Sat, 13 Oct 2018 17:04:11 +0200 Subject: [PATCH] copr: fix rendering of log.gz files this got broken after a66fe3820 because we cannot load mod_access after mod_setenv --- roles/copr/backend/files/lighttpd/lighttpd.conf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/roles/copr/backend/files/lighttpd/lighttpd.conf b/roles/copr/backend/files/lighttpd/lighttpd.conf index 0c542aee2a..b0a09f6cae 100644 --- a/roles/copr/backend/files/lighttpd/lighttpd.conf +++ b/roles/copr/backend/files/lighttpd/lighttpd.conf @@ -77,7 +77,7 @@ var.socket_dir = home_dir + "/sockets" ## Load the modules. #include "modules.conf" server.modules = ( -# "mod_access", + "mod_access", "mod_setenv", "mod_redirect", "mod_indexfile", @@ -470,11 +470,6 @@ $SERVER["socket"] == ":443" { ssl.cipher-list = "ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM" } -$HTTP["url"] =~ "\.log\.gz$" { - setenv.add-response-header = ( "Content-Encoding" => "gzip") - mimetype.assign = ("" => "text/plain" ) -} - url.redirect = ( "^/results/sgallagh/cockpit-preview/(.+)" => "/results/@cockpit/cockpit-preview/$1" ) url.redirect += ( "^/results/(.*)/(.*)/mageia-(.*)-i386(.*)" => "/results/$1/$2/mageia-$3-i586$4" ) @@ -482,10 +477,14 @@ url.redirect += ( "^/results/(.*)/(.*)/mageia-(.*)-i386(.*)" => "/results/$1/$2/ $HTTP["url"] =~ "^/archive/spacewalk($|/)" { dir-listing.activate = "disable" index-file.names = ( "index.html" ) + accesslog.filename = "" } server.max-worker = 6 # this may break many things $HTTP["url"] !~ "^/archive/spacewalk($|/)" { - server.modules += ("mod_access") accesslog.filename = "|/usr/sbin/cronolog /var/log/lighttpd/access.log" + $HTTP["url"] =~ "\.log\.gz$" { + setenv.add-response-header = ( "Content-Encoding" => "gzip") + mimetype.assign = ("" => "text/plain" ) + } }