8e73770eeeff2a23bca9aeaa823ada0e9ef0ae3b
[eostre.git] / dbd-autobuild / conf / dbd.conf
1 <VirtualHost *:80>
2         ServerName www0.defectivebydesign.org
3         ServerAlias www.defectivebydesign.org
4         ServerAlias defectivebydesign.com
5         ServerAlias defectivebydesign.net
6         ServerAlias www.defectivebydesign.com
7         ServerAlias www.defectivebydesign.net
8         ServerAlias dbd.fsf.org
9         ServerAlias defectivebydesign.org
10         ServerAdmin webmaster@fsf.org
11         ### redirect to same domain name, but HTTPS. required for HSTS  
12         RewriteEngine On
13         RewriteCond %{HTTPS} !=on
14         RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
15 </VirtualHost>
16
17 <VirtualHost *:443>
18         ServerName www0.defectivebydesign.org
19         ServerAlias defectivebydesign.com
20         ServerAlias defectivebydesign.net
21         ServerAlias www.defectivebydesign.com
22         ServerAlias www.defectivebydesign.net
23         ServerAlias dbd.fsf.org
24         ServerAlias defectivebydesign.org
25         ServerAdmin webmaster@fsf.org
26         RedirectMatch permanent (.*) https://www.defectivebydesign.org$1
27 </VirtualHost>
28
29 <VirtualHost *:443>
30         ServerName www.defectivebydesign.org
31         ServerAdmin webmaster@fsf.org
32 </VirtualHost>
33
34 <IfModule mod_status.c>
35         #
36         # Allow server status reports generated by mod_status,
37         # with the URL of http://servername/server-status
38         # Uncomment and change the ".example.com" to allow
39         # access from other hosts.
40         #
41         <Location /server-status>
42                 SetHandler server-status
43                 Require host 127.0.0.1 74.94.156.210
44         </Location>
45 </IfModule>
46
47         RedirectPermanent /node/9 http://www.defectivebydesign.org/join
48         RedirectPermanent /feed.xml /rss.xml
49
50         # Cf. RT #716003. Ward, 2011-11-30
51         RedirectPermanent /user/register https://crm.fsf.org/civicrm/profile/create?gid=36&reset=1
52
53         # Cf. RT #839159. Ward, 2013-07-09
54         RedirectPermanent /what_is_drm http://www.defectivebydesign.org/what_is_drm_digital_restrictions_management
55
56
57         #k054 RT #1044876 2015-09-09 
58         RedirectPermanent /donate https://my.fsf.org/civicrm/contribute/transact?reset=1&id=40
59         RedirectPermanent /no-drm-in-html5 https://my.fsf.org/civicrm/profile/create?gid=183&reset=1
60
61         <Directory />
62                 Options FollowSymLinks
63                 AllowOverride None
64         </Directory>
65         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
66         <Directory "/usr/lib/cgi-bin">
67                 AllowOverride None
68                 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
69                 Require all granted
70         </Directory>
71
72         # Possible values include: debug, info, notice, warn, error, crit,
73         # alert, emerg.
74         LogLevel warn
75
76         CustomLog /var/log/apache2/www.defectivebydesign.org-access.log combined
77         ErrorLog /var/log/apache2/www.defectivebydesign.org-error.log
78
79         ServerSignature On
80
81     Alias /doc/ "/usr/share/doc/"
82     <Directory "/usr/share/doc/">
83         Options Indexes MultiViews FollowSymLinks
84         AllowOverride None
85         
86         Require host 127.0.0.0/255.0.0.0 ::1/128
87     </Directory>
88
89   <FilesMatch "\.(ico|pdf|jpe?g|png|gif|js|css)$">
90     ExpiresActive On
91     ExpiresDefault "access plus 1 month"
92   </FilesMatch>
93
94   <FilesMatch ".*">
95     ExpiresActive On
96     ExpiresDefault "access plus 5 minutes"
97   </FilesMatch>
98
99   # broken links to /en/printable, etc
100   # Ward, 2010-01-28
101   RewriteRule ^/en/(.*) /$1 [R]
102
103   RewriteRule ^/amazon-kindle-swindle\. /amazon-kindle-swindle [R]
104
105
106 Redirect /day http://www.defectivebydesign.org/dayagainstdrm/2019
107 RewriteRule ^/dayagainstdrm/?$ http://www.defectivebydesign.org/dayagainstdrm/2019