annotate lighttpd/rlgallery.conf @ 100:44e8aaa20d02 default tip

Fix the format of archive links.
author John "Elwin" Edwards
date Wed, 03 Aug 2022 20:49:38 -0400
parents 801ec25cc0af
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
74
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
1 # lighttpd configuration file for rlgallery.org
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
2 # Include this file in your lighttpd.conf
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
3
80
716f8305d412 Update lighttpd configuration files.
John "Elwin" Edwards
parents: 74
diff changeset
4 # IPv4 and IPv6 addresses need to be explicitly specified
716f8305d412 Update lighttpd configuration files.
John "Elwin" Edwards
parents: 74
diff changeset
5 server.bind = "0.0.0.0"
716f8305d412 Update lighttpd configuration files.
John "Elwin" Edwards
parents: 74
diff changeset
6 $SERVER["socket"] == "[::]:80" { }
716f8305d412 Update lighttpd configuration files.
John "Elwin" Edwards
parents: 74
diff changeset
7
99
801ec25cc0af Update lighttpd configuration.
John "Elwin" Edwards
parents: 98
diff changeset
8 server.document-root := server_root + "/lighttpd"
801ec25cc0af Update lighttpd configuration.
John "Elwin" Edwards
parents: 98
diff changeset
9
74
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
10 # Ensure index.cgi is in the list
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
11 index-file.names += (
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
12 "index.xhtml", "index.html", "index.htm", "index.cgi"
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
13 )
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
14
98
36d6787f7aed Small website updates.
John "Elwin" Edwards
parents: 80
diff changeset
15 server.modules += ( "mod_cgi", "mod_setenv", "mod_redirect" )
74
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
16
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
17 cgi.assign = ( ".cgi" => "" )
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
18
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
19 # The old static high score page now redirects to the CGI script
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
20 $HTTP["host"] =~ "^(.*)$" {
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
21 url.redirect = (
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
22 "^/scoring/highscores.html" => "http://%1/scoring/high.cgi?l=40"
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
23 )
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
24 }
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
25
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
26 # Don't send CGI scripts or python scripts as static files
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
27 static-file.exclude-extensions += ( ".cgi", ".py" )
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
28
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
29 # Use the custom 404 error page
99
801ec25cc0af Update lighttpd configuration.
John "Elwin" Edwards
parents: 98
diff changeset
30 server.error-handler-404 = "/404.html"
74
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
31
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
32 # Set a UTF-8 environment, or Python 3 won't work
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
33 setenv.add-environment = (
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
34 "LC_CTYPE" => "en_US.utf8"
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
35 )
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
36
98
36d6787f7aed Small website updates.
John "Elwin" Edwards
parents: 80
diff changeset
37 setenv.add-response-header = (
36d6787f7aed Small website updates.
John "Elwin" Edwards
parents: 80
diff changeset
38 "Permissions-Policy" => "interest-cohort=()"
36d6787f7aed Small website updates.
John "Elwin" Edwards
parents: 80
diff changeset
39 )
36d6787f7aed Small website updates.
John "Elwin" Edwards
parents: 80
diff changeset
40
74
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
41 # Turn on directory listing where it is needed
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
42 $HTTP["url"] =~ "^/files/" {
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
43 dir-listing.activate = "enable"
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
44 }
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
45 $HTTP["url"] =~ "^/ttyrecs/" {
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
46 dir-listing.activate = "enable"
900da50ee11c Merge lighttpd configuration into one include file.
John "Elwin" Edwards
parents:
diff changeset
47 }
80
716f8305d412 Update lighttpd configuration files.
John "Elwin" Edwards
parents: 74
diff changeset
48