]> git.openstreetmap.org Git - chef.git/blob - cookbooks/mailman/templates/default/apache.erb
2262c3fa280b4f19d68c921dcafebca51536c47b
[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 / https://<%= @name %>/
11 </VirtualHost>
12
13 <VirtualHost *:443>
14         ServerName <%= @name %>
15         ServerAdmin postmaster@openstreetmap.org
16         ServerSignature On
17
18         SSLEngine on
19
20         CustomLog /var/log/apache2/<%= @name %>-access.log combined
21         ErrorLog /var/log/apache2/<%= @name %>-error.log
22         LogLevel warn
23
24         AddDefaultCharset off
25
26         DocumentRoot <%= @directory %>
27
28         RewriteEngine on
29
30         RewriteCond %{HTTP_REFERER} www\.mailbait\.info
31         RewriteRule . - [F,L]
32
33         RedirectMatch ^/$ /listinfo
34         RedirectMatch ^/cgi-bin/mailman/(.*)$ /$1
35
36         <Directory /var/lib/mailman/archives/>
37                 Options Indexes FollowSymLinks
38                 AllowOverride None
39                 Require all granted
40         </Directory>
41
42         Alias /pipermail/ /var/lib/mailman/archives/public/
43         Alias /images/ /usr/share/images/mailman/
44
45         ScriptAlias /admin /usr/lib/cgi-bin/mailman/admin
46         ScriptAlias /admindb /usr/lib/cgi-bin/mailman/admindb
47         ScriptAlias /confirm /usr/lib/cgi-bin/mailman/confirm
48         ScriptAlias /create /usr/lib/cgi-bin/mailman/create
49         ScriptAlias /edithtml /usr/lib/cgi-bin/mailman/edithtml
50         ScriptAlias /listinfo /usr/lib/cgi-bin/mailman/listinfo
51         ScriptAlias /options /usr/lib/cgi-bin/mailman/options
52         ScriptAlias /private /usr/lib/cgi-bin/mailman/private
53         ScriptAlias /rmlist /usr/lib/cgi-bin/mailman/rmlist
54         ScriptAlias /roster /usr/lib/cgi-bin/mailman/roster
55         ScriptAlias /subscribe /usr/lib/cgi-bin/mailman/subscribe
56         ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
57
58         <Location ~ "/pipermail/([^/]+)/(2004|2005|2006|2007|2008|2009|2010|2011|2012|2013|2014)">
59                 ExpiresActive On
60                 ExpiresDefault "access plus 180 days"
61         </Location>
62 </VirtualHost>