X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/fab155273f58e25ea84ded86721a054beeb441d7..5965ce211517c8fb9aa7805c443c088dd4b83e93:/cookbooks/piwik/templates/default/apache.erb?ds=sidebyside diff --git a/cookbooks/piwik/templates/default/apache.erb b/cookbooks/piwik/templates/default/apache.erb index 42aae8254..58703f41b 100644 --- a/cookbooks/piwik/templates/default/apache.erb +++ b/cookbooks/piwik/templates/default/apache.erb @@ -1,30 +1,53 @@ # DO NOT EDIT - This file is being maintained by Chef - + ServerName piwik.openstreetmap.org ServerAlias piwik.osm.org ServerAdmin webmaster@openstreetmap.org + SSLEngine on + SSLCertificateFile /etc/ssl/certs/piwik.openstreetmap.org.pem + SSLCertificateKeyFile /etc/ssl/private/piwik.openstreetmap.org.key + CustomLog /var/log/apache2/piwik.openstreetmap.org-access.log combined ErrorLog /var/log/apache2/piwik.openstreetmap.org-error.log + Options -Indexes + DocumentRoot /srv/piwik.openstreetmap.org - RedirectPermanent /index.php https://piwik.openstreetmap.org/index.php - + ServerName piwik.openstreetmap.org + ServerAlias piwik.osm.org ServerAdmin webmaster@openstreetmap.org - SSLEngine on - SSLProtocol all -SSLv2 - SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW - SSLCertificateFile /etc/ssl/certs/openstreetmap.pem - SSLCertificateKeyFile /etc/ssl/private/openstreetmap.key - CustomLog /var/log/apache2/piwik.openstreetmap.org-access.log combined ErrorLog /var/log/apache2/piwik.openstreetmap.org-error.log - DocumentRoot /srv/piwik.openstreetmap.org - Options -Indexes + RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ + RedirectPermanent / https://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] + + + Header append Content-Encoding gzip + Header append Vary Accept-Encoding + + + + ExpiresDefault "access plus 1 week" + Header set Cache-Control "max-age=604800" + +