Merge lighttpd configuration into one include file.

The lighttpd configuration was previously spread across several files
which were intended to overwrite the defaults.  They often became
outdated.

Now all customization is in lighttpd/rlgallery.conf, which should be
included at the end of whatever main lighttpd configuration file is in
use.  It should require minimal updates for new lighttpd versions or
distribution changes.
This commit is contained in:
John "Elwin" Edwards 2016-12-28 13:12:04 -05:00
parent cd4715b751
commit e48fe73695
8 changed files with 37 additions and 888 deletions

37
lighttpd/rlgallery.conf Normal file
View file

@ -0,0 +1,37 @@
# lighttpd configuration file for rlgallery.org
# Include this file in your lighttpd.conf
# Ensure index.cgi is in the list
index-file.names += (
"index.xhtml", "index.html", "index.htm", "index.cgi"
)
server.modules += ( "mod_cgi", "mod_redirect", "mod_setenv" )
cgi.assign = ( ".cgi" => "" )
# The old static high score page now redirects to the CGI script
$HTTP["host"] =~ "^(.*)$" {
url.redirect = (
"^/scoring/highscores.html" => "http://%1/scoring/high.cgi?l=40"
)
}
# Don't send CGI scripts or python scripts as static files
static-file.exclude-extensions += ( ".cgi", ".py" )
# Use the custom 404 error page
server.error-handler-404 = "404.html"
# Set a UTF-8 environment, or Python 3 won't work
setenv.add-environment = (
"LC_CTYPE" => "en_US.utf8"
)
# Turn on directory listing where it is needed
$HTTP["url"] =~ "^/files/" {
dir-listing.activate = "enable"
}
$HTTP["url"] =~ "^/ttyrecs/" {
dir-listing.activate = "enable"
}