2019-01-17 23:21:55 -05:00
|
|
|
# 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.
|
|
|
|
##
|
|
|
|
|
|
|
|
$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",
|
2019-02-21 21:50:18 -05:00
|
|
|
"./rss(\.xml)?$" => "/rss", # trailing RSS requests
|
2019-01-17 23:21:55 -05:00
|
|
|
"^/feed/?" => "/rss",
|
|
|
|
"^/resume/?" => "/about/resume",
|
|
|
|
"^/hoxsl$" => "/hoxsl/",
|
|
|
|
"^/docs/(.*).html" => "/papers/$1",
|
|
|
|
"^/talks/sapsf/?$" => "/talks/sapsf.pdf",
|
|
|
|
"^/talks/ethics-void/?$" => "/talks/ethics-void.pdf",
|
2023-03-21 00:43:15 -04:00
|
|
|
# cgit => forgejo
|
|
|
|
"^/projects/?$" => "//forge.mikegerwitz.com/",
|
|
|
|
"^/projects/(easejs(/.*)?)$" => "//forge.mikegerwitz.com/GNU/$1",
|
|
|
|
"^/projects/((tame|liza|liza-proguic|lvspec)(/.*)?)$" => "//forge.mikegerwitz.com/employer/$1",
|
|
|
|
"^/projects/(.+)$" => "//forge.mikegerwitz.com/mikegerwitz/$1",
|
2019-01-17 23:21:55 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
url.rewrite-once = (
|
|
|
|
"^/\.well-known/.*" => "$0",
|
|
|
|
"^/[0-9]{4}/[0-9]{2}/.*[A-Z].*$" => "/redirect-map.php?path=$0",
|
|
|
|
"^/projects/static/.*" => "$0",
|
|
|
|
"^/rss/?" => "/rss.xml",
|
|
|
|
"^/.+\.[a-zA-Z]+$" => "$0",
|
|
|
|
"^/docs/.*?$" => "$0",
|
|
|
|
"^/hoxsl/.*?$" => "$0",
|
|
|
|
"^/talks/sapsf/?$" => "$0",
|
|
|
|
"^/talks/ethics-void/?$" => "$0",
|
2023-03-21 00:43:15 -04:00
|
|
|
"^/projects/?.*$" => "$0",
|
2019-01-17 23:21:55 -05:00
|
|
|
"^/(.+?)/?$" => "/$1.html",
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|