commented and rearranged dbd.conf, as well as merging in the old dbd-common.conf
[eostre.git] / dbd-autobuild / conf / dbd.conf
CommitLineData
550cc391 1# <aliases for dbd>
3b514988 2<VirtualHost *:80>
3 ServerName www0.defectivebydesign.org
4 ServerAlias www.defectivebydesign.org
5 ServerAlias defectivebydesign.com
6 ServerAlias defectivebydesign.net
7 ServerAlias www.defectivebydesign.com
8 ServerAlias www.defectivebydesign.net
9 ServerAlias dbd.fsf.org
10 ServerAlias defectivebydesign.org
11 ServerAdmin webmaster@fsf.org
12 ### redirect to same domain name, but HTTPS. required for HSTS
13 RewriteEngine On
14 RewriteCond %{HTTPS} !=on
15 RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
16</VirtualHost>
17
18<VirtualHost *:443>
19 ServerName www0.defectivebydesign.org
20 ServerAlias defectivebydesign.com
21 ServerAlias defectivebydesign.net
22 ServerAlias www.defectivebydesign.com
23 ServerAlias www.defectivebydesign.net
24 ServerAlias dbd.fsf.org
25 ServerAlias defectivebydesign.org
26 ServerAdmin webmaster@fsf.org
27 RedirectMatch permanent (.*) https://www.defectivebydesign.org$1
28</VirtualHost>
29
30<VirtualHost *:443>
31 ServerName www.defectivebydesign.org
32 ServerAdmin webmaster@fsf.org
33</VirtualHost>
550cc391 34# </aliases>
3b514988 35
550cc391 36# <configure some basic server parameters>
37# Possible values include: debug, info, notice, warn, error, crit,
38# alert, emerg.
39LogLevel warn
40ServerSignature On
41# </basic params>
42
43# if we have mod_status, use it
b6e582d4 44<IfModule mod_status.c>
45 #
46 # Allow server status reports generated by mod_status,
47 # with the URL of http://servername/server-status
48 # Uncomment and change the ".example.com" to allow
49 # access from other hosts.
50 #
51 <Location /server-status>
52 SetHandler server-status
53 Require host 127.0.0.1 74.94.156.210
54 </Location>
55</IfModule>
56
550cc391 57# <redirects/shortenings of URLs>
58Redirect ^/amazon-kindle-swindle\. /amazon-kindle-swindle
b6e582d4 59Redirect /day http://www.defectivebydesign.org/dayagainstdrm/2019
550cc391 60Redirect ^/dayagainstdrm/?$ http://www.defectivebydesign.org/dayagainstdrm/2019
61RedirectPermanent /node/9 /join
62RedirectPermanent /feed.xml /rss.xml
63
64# Cf. RT #716003. Ward, 2011-11-30
65RedirectPermanent /user/register https://crm.fsf.org/civicrm/profile/create?gid=36&reset=1
66
67# Cf. RT #839159. Ward, 2013-07-09
68RedirectPermanent /what_is_drm http://www.defectivebydesign.org/what_is_drm_digital_restrictions_management
69
70#k054 RT #1044876 2015-09-09
71RedirectPermanent /donate https://my.fsf.org/civicrm/contribute/transact?reset=1&id=40
72RedirectPermanent /no-drm-in-html5 https://my.fsf.org/civicrm/profile/create?gid=183&reset=1
73
74# broken links to /en/printable, etc
75# Ward, 2010-01-28
76RewriteRule ^/en/(.*) /$1 [R]
77# </redirects>
78
79# <I think this is for security? idk why we would be messing with / when our webroot is /var/www/html>
80# I'm just an intern, fiddling with code written before I could `echo Hello World`
81# - Eostre, 2020-08-04
82<Directory />
83 Options FollowSymLinks
84 AllowOverride None
85</Directory>
86# </weird stuff>
87
88# <add CGI scripts shipping by our distro>
89ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
90<Directory "/usr/lib/cgi-bin">
91 AllowOverride None
92 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
93 Require all granted
94</Directory>
95# </cgi>
96
97# <allow us to access usr/share/doc over HTTP, but only from localhost, e.g. allow us to use an SSH tunnel to access it>
98Alias /doc/ "/usr/share/doc/"
99<Directory "/usr/share/doc/">
100 Options Indexes MultiViews FollowSymLinks
101 AllowOverride None
102 Require host 127.0.0.0/255.0.0.0 ::1/128
103</Directory>
104# </share/doc fuckery>
105
106# <manage caching: sets the Expires and Cache-Control headers so that clients know when to use their cache vs. when to refetch a resource>
107<FilesMatch "\.(ico|pdf|jpe?g|png|gif|js|css)$">
108 ExpiresActive On
109 ExpiresDefault "access plus 1 month"
110</FilesMatch>
111
112<FilesMatch ".*">
113 ExpiresActive On
114 ExpiresDefault "access plus 5 minutes"
115</FilesMatch>
116# </caching>