Skip to content

Commit 0de89ab

Browse files
committed
cleaned up config (whitespace, dead comments, etc.)
1 parent f824b38 commit 0de89ab

File tree

1 file changed

+59
-59
lines changed

1 file changed

+59
-59
lines changed

config/livelicenses/000-default.conf

+59-59
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<VirtualHost *:8080>
22
ServerName licenses.productionwww.creativecommons.uk0.bigv.io
3-
#ServerName creativecommons.org
43
DocumentRoot /var/www/creativecommons.org/docroot
54

65
# CloudFlare doesn't like ranges - 20150804-rob.
76
Header set Accept-Ranges none
87

9-
# We're (ultimately) proxied through varnish, so drop idle connections quickly
10-
KeepAlive Off
8+
# We're (ultimately) proxied through varnish, so drop idle connections
9+
# quickly
10+
KeepAlive Off
1111

1212
# For munin
1313
<IfModule mod_status.c>
14-
<Location /server-status>
15-
SetHandler server-status
16-
Require local
17-
</Location>
14+
<Location /server-status>
15+
SetHandler server-status
16+
Require local
17+
</Location>
1818
</IfModule>
1919

2020
# Only allow connections from wwwlive
@@ -36,13 +36,13 @@
3636

3737
<Location /server-status>
3838
SetHandler server-status
39-
Order deny,allow
40-
Deny from all
41-
Allow from 127.0.0.1
39+
Order deny,allow
40+
Deny from all
41+
Allow from 127.0.0.1
4242
</Location>
4343

44-
# ScriptAlias "/update-translations" "/var/www/cci18n-webhook/app/webhook.php"
45-
# ScriptAlias "/update-legalcode" "/var/www/ccorg-webhook/app/webhook.php"
44+
#ScriptAlias "/update-translations" "/var/www/cci18n-webhook/app/webhook.php"
45+
#ScriptAlias "/update-legalcode" "/var/www/ccorg-webhook/app/webhook.php"
4646

4747
#----------
4848
# Main (general configs)
@@ -76,9 +76,9 @@
7676
DirectoryIndex deed
7777
DefaultType text/html
7878
AddDefaultCharset utf-8
79-
Require all granted
79+
Require all granted
8080
</Location>
81-
81+
8282
# Always serve up deeds as text/html, even when the country code
8383
# extension makes Apache think it's something else, like .pl being
8484
# a perl script instead of Poland, but not if it's a CSS file.
@@ -95,7 +95,7 @@
9595
### ------------------------- ####
9696
## BEGIN mod_rewrite section ##
9797
### ------------------------- ####
98-
98+
9999
RewriteEngine on
100100

101101
# LogLevel alert rewrite:trace1
@@ -105,16 +105,16 @@
105105
# sure to recomment them and restart Apache when done because the file will
106106
# become immense in a hurry.
107107
#----------
108-
108+
109109
#RewriteLog /tmp/rewrite.log
110110
#RewriteLogLevel 5
111-
111+
112112
#----------
113113
# Config
114114
#----------
115-
115+
116116
RewriteMap uppercase int:toupper
117-
117+
118118
#----------
119119
# License engine and legalcode
120120
#----------
@@ -124,8 +124,8 @@
124124
#<Location /ccengine-fcgi>
125125
# DefaultType text/html
126126
# AddDefaultCharset utf-8
127-
#Require local
128-
# Require all granted
127+
#Require local
128+
# Require all granted
129129
# </Location>
130130

131131
<Directory /var/www/creativecommons.org/python_env/bin>
@@ -141,32 +141,32 @@
141141
<Location /cc.engine-cache>
142142
DefaultType text/html
143143
AddDefaultCharset utf-8
144-
#Require all granted
144+
#Require all granted
145145
</Location>
146146

147147
<Directory /var/www/creativecommons.org/python_env/cache>
148148
Require all granted
149149
</Directory>
150150

151151
#RewriteRule "^/discover/gift-guide(.*)$" "/wp-content/themes/creativecommons.org/discover/gift-guide/$1" [PT]
152-
#Alias /discover/gift-guide/ /var/www/cc-wp-theme/creativecommons.org/discover/gift-guide/
152+
#Alias /discover/gift-guide/ /var/www/cc-wp-theme/creativecommons.org/discover/gift-guide/
153153
#Alias /discover/gift-guide /var/www/creativecommons.org/discover/gift-guide
154154
<Directory /var/www/creativecommons.org/discover/gift-guide>
155155
Options Indexes FollowSymLinks MultiViews
156-
# AllowOverride All
157-
# Order allow,deny
158-
# Allow from all
156+
# AllowOverride All
157+
# Order allow,deny
158+
# Allow from all
159159
# Require all granted
160-
# Satisfy Any
160+
# Satisfy Any
161161
</Directory>
162162

163163
<Directory /var/www/creativecommons.org/faq/>
164164
Options Indexes FollowSymLinks MultiViews
165-
# AllowOverride All
166-
# Order allow,deny
167-
# Allow from all
165+
# AllowOverride All
166+
# Order allow,deny
167+
# Allow from all
168168
# Require all granted
169-
# Satisfy Any
169+
# Satisfy Any
170170
</Directory>
171171

172172

@@ -194,30 +194,30 @@
194194
# http://code.creativecommons.org/issues/issue898
195195
RewriteRule ^/licenses/cc0/1.0(.*)$ https://creativecommons.org/publicdomain/zero/1.0$1 [L,R=301]
196196
RewriteRule ^/licenses/CC0/1.0(.*)$ https://creativecommons.org/publicdomain/zero/1.0$1 [L,R=301]
197-
# And #694
197+
# And #694
198198
RewriteRule ^/licenses/zero/1.0/(.*)$ https://creativecommons.org/publicdomain/zero/1.0/$1 [L,R=301]
199-
199+
200200
# Address https://github.com/creativecommons/creativecommons.org/issues/563
201201
RewriteRule ^/publicdomain/zero/1.0/deed.en/$ https://creativecommons.org/publicdomain/zero/1.0/deed.en [L,R=301]
202-
202+
203203
# Legalcode rewrites
204-
# FIXME: eval whether we should use the LHS as the actual file structure so we don't need the rewrites
204+
# FIXME: eval whether we should use the LHS as the actual file structure so we don't need the rewrites
205205
RewriteRule ^/legalcode http://creativecommons.org/ [L,R=301]
206206
RewriteRule .*legalcode/$ http://creativecommons.org/ [L,R=301]
207-
RewriteRule ^/licenses/(.*)sampling\+/1.0/(.*)/legalcode$ /legalcode/$1samplingplus_1.0_$2.html [L]
207+
RewriteRule ^/licenses/(.*)sampling\+/1.0/(.*)/legalcode$ /legalcode/$1samplingplus_1.0_$2.html [L]
208208
RewriteRule ^/licenses/(.*)sampling\+/1.0/legalcode$ /legalcode/$1samplingplus_1.0.html [L]
209209
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/legalcode$ /legalcode/$1_$2.html [L]
210210
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/legalcode\.txt$ /legalcode/$1_$2.txt [L]
211211
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/(.*)/legalcode\.([A-Za-z-]+)$ /legalcode/$1_$2_$3_$4.html [L]
212-
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/legalcode\.([A-Za-z-]+)$ /legalcode/$1_$2_$3.html [L]
213-
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/(.*)/legalcode$ /legalcode/$1_$2_$3.html [L]
212+
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/legalcode\.([A-Za-z-]+)$ /legalcode/$1_$2_$3.html [L]
213+
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/(.*)/legalcode$ /legalcode/$1_$2_$3.html [L]
214214
RewriteRule ^/publicdomain/(.*)/([0-9]\.[0-9])/legalcode$ /legalcode/$1_$2.html [L]
215215
RewriteRule ^/publicdomain/(.*)/([0-9]\.[0-9])/legalcode\.txt$ /legalcode/$1_$2.txt [L]
216216
# Legalcodes can have extensions of the form .fr or .zh-Hant
217-
RewriteRule ^/publicdomain/(.*)/([0-9]\.[0-9])/legalcode\.([a-z][a-z](-[A-Z][a-z][a-z][a-z])?)$ /legalcode/$1_$2_$3.html [L]
217+
RewriteRule ^/publicdomain/(.*)/([0-9]\.[0-9])/legalcode\.([a-z][a-z](-[A-Z][a-z][a-z][a-z])?)$ /legalcode/$1_$2_$3.html [L]
218218

219219
# License RDF rewrites
220-
# FIXME: eval whether we should use the LHS as the actual file structure so we don't need the rewrites
220+
# FIXME: eval whether we should use the LHS as the actual file structure so we don't need the rewrites
221221
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/([a-z]+)/license_rdf$ /license_rdf/creativecommons.org_licenses_$1_$2_$3_.rdf [L,T=application/rdf+xml]
222222
RewriteRule ^/licenses/(.*)/([0-9]\.[0-9])/([a-z]+)/rdf$ /license_rdf/creativecommons.org_licenses_$1_$2_$3_.rdf [L,T=application/rdf+xml]
223223
RewriteRule ^/licenses/index.rdf$ /rdf/index.rdf [L,T=application/rdf+xml]
@@ -226,14 +226,14 @@
226226
RewriteRule ^/(publicdomain|licenses)/(.*)/([0-9]\.[0-9])/license_rdf$ /license_rdf/creativecommons.org_$1_$2_$3_.rdf [L,T=application/rdf+xml]
227227
RewriteRule ^/(publicdomain|licenses)/(.*)/([0-9]\.[0-9])/rdf$ /license_rdf/creativecommons.org_$1_$2_$3_.rdf [L,T=application/rdf+xml]
228228
RewriteRule .*rdf/$ http://creativecommons.org/ [L,R=301]
229-
229+
230230
# See if deed is cached before sending to cc.engine
231-
# FIXME: eval memcache as an alternative?
231+
# FIXME: eval memcache as an alternative?
232232
RewriteCond %{REQUEST_URI} ^/licenses
233233
RewriteCond /var/www/creativecommons.org//python_env/cache/%{REQUEST_FILENAME} -s
234234
RewriteRule ^/licenses/(.*) /cc.engine-cache/licenses/$1 [L,PT]
235235

236-
# FIXME: do we really need rewrites for other licenses like GPL, etc?
236+
# FIXME: do we really need rewrites for other licenses like GPL, etc?
237237
RewriteRule (.*)licence(.*) https://creativecommons.org$1license$2 [L,R=301]
238238
RewriteRule ^/(license|choose|characteristic|publicdomain)$ http://creativecommons.org/$1/ [L,R=301]
239239
RewriteRule ^/(license|choose|characteristic|publicdomain)/(.*) /ccengine-fcgi/$1/$2 [PT,L]
@@ -407,11 +407,10 @@
407407

408408
RewriteRule ^/government http://creativecommons.org/publicpolicy [L,R=301]
409409

410-
#----------
410+
#----------
411411
# Redirects to CC.net
412-
#----------
413-
# FIXME: a bunch of these have moved / don't exist anymore
414-
412+
#----------
413+
# FIXME: a bunch of these have moved / don't exist anymore
415414
RewriteRule ^/about/affiliates.*$ http://creativecommons.net/supporters [R=301,L]
416415
RewriteRule ^/about/lessigletter.*$ http://creativecommons.net/letters [L,R=301]
417416
RewriteRule ^/about/supporters$ http://creativecommons.net/supporters [L,R=301]
@@ -425,13 +424,12 @@
425424
#----------
426425
# Miscellaneous
427426
#----------
428-
429427
# Map backwardly named license types to their actual location
430428
RewriteRule ^/licenses/by-nc-nd/1.0/(.*)$ http://creativecommons.org/licenses/by-nd-nc/1.0/$1 [L,R=301]
431429
RewriteRule ^/licenses/by-nd-nc/2.0/(.*)$ http://creativecommons.org/licenses/by-nc-nd/2.0/$1 [L,R=301]
432-
430+
433431
# Map the namespace document and schema URLs
434-
# FIXME: are symlinks cleaner?
432+
# FIXME: are symlinks cleaner?
435433
RewriteRule ^/ns$ /rdf/ns.html [L]
436434
RewriteRule ^/schema.rdf$ /rdf/schema.rdf [L]
437435

@@ -463,7 +461,7 @@
463461
#----------
464462
# WordPress rules here instead of .htaccess
465463
#----------
466-
464+
467465
# NOTE: sometimes Wordpress decides what page to display based on both the
468466
# query string AND the REQUEST_URI. mod_rewrite does not alter the
469467
# REQUEST_URI, and therefore mod_rewrite by itself is not always enough to
@@ -483,33 +481,35 @@
483481
RewriteRule ^/weblog(/archive|)/(\d+)/?$ https://blog.creativecommons.org/$2 [L]
484482
RewriteRule ^/weblog/?$ https://blog.creativecommons.org/ [L]
485483
RewriteRule ^/press-releases/entry/(\d+)/?$ https://blog.creativecommons.org/index.php?p=$1 [L]
486-
484+
487485
# Catch any requests for the general /weblog/archive and also to the
488486
# archives for any particular year/month and then redirect the client
489487
# to the new-style permalink
490488
RewriteRule ^/weblog/archive(/?.*)$ https://blog.creativecommons.org$1 [L,R=301]
491-
489+
492490
# Catch any old permalinks that point to long, ugly post names. The
493491
# CC Permalink Mapper will get this request and redirect the user accordingly.
494492
# But don't do this if someone was trying to access some particular feed
495493
RewriteCond %{REQUEST_URI} !^/([a-z-]+)/\d{4}/\d{2}/feed
496494
RewriteRule ^/([a-z-]+)/\d{4}/\d{2}/([a-zA-Z0-9-]+)/?$ /index.php?post_name=$2&category=$1&roflcopter [L]
497-
495+
498496
# '<some path>/rss' returns an RSS 0.92 feed, which we don't want, so make any
499497
# requests for '<some path>/rss' return an RSS 2 feed.
500-
RewriteRule ^/(.*?)rss/?$ /index.php/$1?feed=rss2 [L]
498+
RewriteRule ^/(.*?)rss/?$ /index.php/$1?feed=rss2 [L]
501499

502500
RewriteRule ^/feed/(.*?)?$ https://blog.creativecommons.org/feed/?$1 [L]
503501

504502
# Get missing upload files from the main site
505-
# NOTE: disable in production - for staging sites only (so media URLs will work)
503+
# NOTE: disable in production - for staging sites only (so media URLs will
504+
# work)
506505
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
507506
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
508507
RewriteRule ^/(wp-content/uploads/.*)$ http://creativecommons.org/$1 [L]
509-
508+
510509
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
511510
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
512-
# Breaks fcgi etc. Needs constraining to dirs where needed if used
513-
# RewriteRule . /index.php [L]
511+
# Breaks fcgi etc. Needs constraining to dirs where needed if used
512+
# RewriteRule . /index.php [L]
514513

515514
</VirtualHost>
515+
# vim: ft=apache ts=4 sw=4 sts=4 sr et:

0 commit comments

Comments
 (0)