]> git.openstreetmap.org Git - chef.git/blob - cookbooks/mailman/templates/default/apache.erb
Switch lists.osm.org to letsencrypt
[chef.git] / cookbooks / mailman / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:80>
4         ServerName <%= @name %>
5         ServerAdmin postmaster@openstreetmap.org
6
7         CustomLog /var/log/apache2/<%= @name %>-access.log combined
8         ErrorLog /var/log/apache2/<%= @name %>-error.log
9
10         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
11         RedirectPermanent / https://<%= @name %>/
12 </VirtualHost>
13
14 <VirtualHost *:443>
15         ServerName <%= @name %>
16         ServerAdmin postmaster@openstreetmap.org
17         ServerSignature On
18
19         SSLEngine on
20         SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
21         SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
22
23         CustomLog /var/log/apache2/<%= @name %>-access.log combined
24         ErrorLog /var/log/apache2/<%= @name %>-error.log
25         LogLevel warn
26
27         AddDefaultCharset off
28
29         DocumentRoot <%= @directory %>
30
31         RewriteEngine on
32
33         RewriteCond %{HTTP_REFERER} www\.mailbait\.info
34         RewriteRule . - [F,L]
35
36         RedirectMatch ^/$ /listinfo
37         RedirectMatch ^/cgi-bin/mailman/(.*)$ /$1
38
39         <Directory /var/lib/mailman/archives/>
40                 Options Indexes FollowSymLinks
41                 AllowOverride None
42                 Require all granted
43         </Directory>
44
45         Alias /pipermail/ /var/lib/mailman/archives/public/
46         Alias /images/ /usr/share/images/mailman/
47
48         ScriptAlias /admin /usr/lib/cgi-bin/mailman/admin
49         ScriptAlias /admindb /usr/lib/cgi-bin/mailman/admindb
50         ScriptAlias /confirm /usr/lib/cgi-bin/mailman/confirm
51         ScriptAlias /create /usr/lib/cgi-bin/mailman/create
52         ScriptAlias /edithtml /usr/lib/cgi-bin/mailman/edithtml
53         ScriptAlias /listinfo /usr/lib/cgi-bin/mailman/listinfo
54         ScriptAlias /options /usr/lib/cgi-bin/mailman/options
55         ScriptAlias /private /usr/lib/cgi-bin/mailman/private
56         ScriptAlias /rmlist /usr/lib/cgi-bin/mailman/rmlist
57         ScriptAlias /roster /usr/lib/cgi-bin/mailman/roster
58         ScriptAlias /subscribe /usr/lib/cgi-bin/mailman/subscribe
59         ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
60
61         <Location ~ "/pipermail/([^/]+)/(2004|2005|2006|2007|2008|2009|2010|2011|2012|2013|2014)">
62                 ExpiresActive On
63                 ExpiresDefault "access plus 180 days"
64         </Location>
65 </VirtualHost>