# DO NOT EDIT - This file is being maintained by Chef
ServerName matomo.openstreetmap.org
ServerAdmin webmaster@openstreetmap.org
SSLEngine on
SSLCertificateFile /etc/ssl/certs/matomo.openstreetmap.org.pem
SSLCertificateKeyFile /etc/ssl/private/matomo.openstreetmap.org.key
CustomLog /var/log/apache2/matomo.openstreetmap.org-access.log combined
ErrorLog /var/log/apache2/matomo.openstreetmap.org-error.log
Options -Indexes
DocumentRoot /srv/matomo.openstreetmap.org
Redirect 403 /core/
Redirect 403 /config/
Redirect 403 /lang/
Redirect 403 /tmp/
ServerName matomo.osm.org
ServerAlias piwik.openstreetmap.org
ServerAlias piwik.osm.org
ServerAdmin webmaster@openstreetmap.org
SSLEngine on
SSLCertificateFile /etc/ssl/certs/matomo.openstreetmap.org.pem
SSLCertificateKeyFile /etc/ssl/private/matomo.openstreetmap.org.key
CustomLog /var/log/apache2/matomo.openstreetmap.org-access.log combined
ErrorLog /var/log/apache2/matomo.openstreetmap.org-error.log
RedirectPermanent / https://matomo.openstreetmap.org/
ServerName matomo.openstreetmap.org
ServerAlias matomo.osm.org
ServerAlias piwik.openstreetmap.org
ServerAlias piwik.osm.org
ServerAdmin webmaster@openstreetmap.org
CustomLog /var/log/apache2/matomo.openstreetmap.org-access.log combined
ErrorLog /var/log/apache2/matomo.openstreetmap.org-error.log
RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
RedirectPermanent / https://matomo.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"
SetHandler "proxy:unix:/run/php/matomo.openstreetmap.org.sock|fcgi://127.0.0.1"