1 # DO NOT EDIT - This file is being maintained by Chef
4 ServerName matomo.openstreetmap.org
5 ServerAdmin webmaster@openstreetmap.org
8 SSLCertificateFile /etc/ssl/certs/matomo.openstreetmap.org.pem
9 SSLCertificateKeyFile /etc/ssl/private/matomo.openstreetmap.org.key
11 CustomLog /var/log/apache2/matomo.openstreetmap.org-access.log combined_extended
12 ErrorLog /var/log/apache2/matomo.openstreetmap.org-error.log
16 DocumentRoot /srv/matomo.openstreetmap.org
25 ServerName matomo.osm.org
26 ServerAlias piwik.openstreetmap.org
27 ServerAlias piwik.osm.org
28 ServerAdmin webmaster@openstreetmap.org
31 SSLCertificateFile /etc/ssl/certs/matomo.openstreetmap.org.pem
32 SSLCertificateKeyFile /etc/ssl/private/matomo.openstreetmap.org.key
34 CustomLog /var/log/apache2/matomo.openstreetmap.org-access.log combined_extended
35 ErrorLog /var/log/apache2/matomo.openstreetmap.org-error.log
37 RedirectPermanent / https://matomo.openstreetmap.org/
41 ServerName matomo.openstreetmap.org
42 ServerAlias matomo.osm.org
43 ServerAlias piwik.openstreetmap.org
44 ServerAlias piwik.osm.org
45 ServerAdmin webmaster@openstreetmap.org
47 CustomLog /var/log/apache2/matomo.openstreetmap.org-access.log combined_extended
48 ErrorLog /var/log/apache2/matomo.openstreetmap.org-error.log
50 RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
51 RedirectPermanent / https://matomo.openstreetmap.org/
54 <Directory /srv/matomo.openstreetmap.org>
60 RewriteCond "%{HTTP:Accept-Encoding}" "br"
61 RewriteCond "%{REQUEST_FILENAME}\.br" -s
62 RewriteRule "^(.*)\.js" "$1\.js\.br" [QSA]
64 RewriteCond "%{HTTP:Accept-Encoding}" "gzip"
65 RewriteCond "%{REQUEST_FILENAME}\.gz" -s
66 RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]
68 RewriteRule "\.js\.(br|gz)$" "-" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
70 <FilesMatch "\.js\.br$">
71 Header append Content-Encoding br
72 Header append Vary Accept-Encoding
75 <FilesMatch "\.js\.gz$">
76 Header append Content-Encoding gzip
77 Header append Vary Accept-Encoding
80 <FilesMatch "(\.js|\.js\.gz|\.js\.br)$">
81 ExpiresDefault "access plus 1 week"
82 Header set Cache-Control "max-age=604800"
85 <FilesMatch ".+\.ph(ar|p|tml)$">
86 SetHandler "proxy:unix:/run/php/php-matomo.openstreetmap.org-fpm.sock|fcgi://127.0.0.1"