conf/lighttpd.conf: New file

At various points in commit messages I have referenced server
configuration.  This elucidates that.
master
Mike Gerwitz 2019-01-17 23:21:55 -05:00
parent 0745930e55
commit 5d60ae67d1
Signed by: mikegerwitz
GPG Key ID: 8C917B7F5DC51BA2
1 changed files with 59 additions and 0 deletions

59
conf/lighttpd.conf 100644
View File

@ -0,0 +1,59 @@
# Lighttpd server configuration for mikegerwitz.com
#
# This file has accumulated a lot of cruft over the years, a lot of which is
# probably no longer necessary. Most of the redirections handle transitions
# form older version of the site.
#
# This site uses cgit at /projects, but is otherwise a static website.
##
$HTTP["scheme"] == "https" {
$HTTP["host"] =~ "^www.mikegerwitz\.com" {
url.redirect = ( "^(.*)$" => "https://mikegerwitz.com$0" )
}
$HTTP["host"] =~ "^mikegerwitz\.com" {
server.document-root = "/home/mikegerwitz/main/com"
server.errorlog = "/var/log/lighttpd/mikegerwitz-error.log"
accesslog.filename = "/var/log/lighttpd/mikegerwitz-access.log"
server.errorfile-prefix = "/home/mikegerwitz/main/com/"
url.redirect = (
# old URL
"^/2[0-9]{3}/[0-9]+/[0-9]+/(.*)$" => "/$1",
"^/papers/git-horror-story" => "/2012/05/a-git-horror-story-repository-integrity-with-signed-commits",
"^/thoughts(/.*)?$" => "/$1",
"^/feed/?" => "/rss",
"^/resume/?" => "/about/resume",
"^/hoxsl$" => "/hoxsl/",
"^/docs/(.*).html" => "/papers/$1",
"^/talks/sapsf/?$" => "/talks/sapsf.pdf",
"^/talks/ethics-void/?$" => "/talks/ethics-void.pdf",
"^/projects/$" => "/projects",
)
url.rewrite-once = (
"^/\.well-known/.*" => "$0",
"^/[0-9]{4}/[0-9]{2}/.*[A-Z].*$" => "/redirect-map.php?path=$0",
"^/projects/static/.*" => "$0",
"^/projects$" => "/cgit.cgi",
"^/projects/([^?/]+(/[^?]*)?)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$3",
"^/rss/?" => "/rss.xml",
"^/.+\.[a-zA-Z]+$" => "$0",
"^/docs/.*?$" => "$0",
"^/hoxsl/.*?$" => "$0",
"^/talks/sapsf/?$" => "$0",
"^/talks/ethics-void/?$" => "$0",
"^/(.+?)/?$" => "/$1.html",
)
alias.url = (
"/cgit.cgi" => "/usr/lib/cgit/cgit.cgi",
"/projects/static/" => "/usr/share/cgit/",
)
cgi.assign = (
"/usr/lib/cgit/cgit.cgi" => "",
)
}
}