]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/piwik/templates/default/apache.erb
Remove roles for fuchur, glaedr, gorwen, idris and lockheed
[chef.git] / cookbooks / piwik / templates / default / apache.erb
index 8f27414ba3f69629d00469c1ded2d1538a20ef99..f513ce9c2c8ddfc4d49d2ee9d498669b7fa550b5 100644 (file)
 
 <Directory /srv/piwik.openstreetmap.org>
        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]
+
+       <FilesMatch "\.js\.gz$">
+               Header append Content-Encoding gzip
+               Header append Vary Accept-Encoding
+       </FilesMatch>
+
+       <FilesMatch "(\.js|\.js\.gz)$">
+               ExpiresDefault "access plus 1 week"
+               Header set Cache-Control "max-age=604800"
+       </FilesMatch>
+
+        <FilesMatch ".+\.ph(ar|p|tml)$">
+                SetHandler "proxy:unix:/run/php/piwik.openstreetmap.org.sock|fcgi://127.0.0.1"
+        </FilesMatch>
 </Directory>