# This is a sub-conf file for lighttpd # Its purpose is to serve localhost:8000 to anyone reaching https://kto.black # It should thus be copied to /etc/lighttpd/conf-available, and symlinked to conf-enabled # The other links in conf-enabled should be 10-proxy.conf and 10-ssl.conf # A self signed certificate with key included should be generated at /etc/lighttpd/server.pem $SERVER["socket"] == ":80" { $HTTP["host"] =~ ".*" { url.redirect = (".*" => "https://kto.black") } } $SERVER["socket"] == ":443" { $HTTP["host"] == "kto.black" { proxy.server = ("" => (("host" => "localhost", "port" => 8000))) proxy.header = ( "upgrade" => "enable" ) } }