X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e936bc87af74e629f14f70337f2bf8e19b79ccc3..7f5c025954a0868b7ac2aea8722089e75c39668e:/cookbooks/piwik/templates/default/apache.erb diff --git a/cookbooks/piwik/templates/default/apache.erb b/cookbooks/piwik/templates/default/apache.erb index 8f27414ba..f513ce9c2 100644 --- a/cookbooks/piwik/templates/default/apache.erb +++ b/cookbooks/piwik/templates/default/apache.erb @@ -31,4 +31,27 @@ Require all granted + + ExpiresActive On + RewriteEngine on + + RewriteCond "%{HTTP:Accept-encoding}" "gzip" + RewriteCond "%{REQUEST_FILENAME}\.gz" -s + RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA] + + RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1] + + + Header append Content-Encoding gzip + Header append Vary Accept-Encoding + + + + ExpiresDefault "access plus 1 week" + Header set Cache-Control "max-age=604800" + + + + SetHandler "proxy:unix:/run/php/piwik.openstreetmap.org.sock|fcgi://127.0.0.1" +