61 lines
2.0 KiB
Plaintext
61 lines
2.0 KiB
Plaintext
# 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",
|
|
"./rss(\.xml)?$" => "/rss", # trailing RSS requests
|
|
"^/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" => "",
|
|
)
|
|
}
|
|
}
|
|
|