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