Mike Gerwitz

Free Software Hacker+Activist

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mtg@gnu.org>2019-01-17 23:21:55 -0500
committerMike Gerwitz <mtg@gnu.org>2019-01-17 23:22:03 -0500
commit5d60ae67d10debcd2958daafde6e12bde0503646 (patch)
tree217b31c833c2db3bde8f3014ac7ffa766026b89a
parent0745930e55bb0217f7f146d813068d988cdc18fc (diff)
downloadthoughts-5d60ae67d10debcd2958daafde6e12bde0503646.zip
thoughts-5d60ae67d10debcd2958daafde6e12bde0503646.tar.gz
thoughts-5d60ae67d10debcd2958daafde6e12bde0503646.tar.bz2
conf/lighttpd.conf: New file
At various points in commit messages I have referenced server configuration. This elucidates that.
-rw-r--r--conf/lighttpd.conf59
1 files changed, 59 insertions, 0 deletions
diff --git a/conf/lighttpd.conf b/conf/lighttpd.conf
new file mode 100644
index 0000000..df2f7e5
--- /dev/null
+++ b/conf/lighttpd.conf
@@ -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" => "",
+ )
+ }
+}
+