X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=etc%2Flighttpd%2Fvhosts%2Fstdin-nl;h=f778be996cfc1cd33e5cabd31d520bd2362f6197;hb=554023e3ee2c57f97c61eca5ce2f000fdf417850;hp=cdec07a873d409c2dbe0c2aac0359fb31a1742ba;hpb=b51e062dca9319e2d9fb48af845815bdbd50a5cc;p=matthijs%2Fservers%2Fdrsnuggles.git diff --git a/etc/lighttpd/vhosts/stdin-nl b/etc/lighttpd/vhosts/stdin-nl index cdec07a..f778be9 100644 --- a/etc/lighttpd/vhosts/stdin-nl +++ b/etc/lighttpd/vhosts/stdin-nl @@ -3,7 +3,6 @@ $HTTP["host"] =~ ".stdin.nl$" { var.site-fcgi-dir = var.fcgi-dir + "/stdin-nl" evhost.path-pattern = var.site-dir + "/htdocs/%3/" - accesslog.filename = var.site-dir + "/logs/access.log" fastcgi.server = ( ".php" => (( @@ -11,4 +10,24 @@ $HTTP["host"] =~ ".stdin.nl$" { "broken-scriptfilename" => "enable", )) ) + + $HTTP["host"] == "mail.stdin.nl" { + alias.url += ( "/squirrel" => "/usr/share/squirrelmail" ) + + # Only expose parts of the hastymail directory + $HTTP["url"] =~ "^/hastymail(|/index.php|/templates|/js|/plugins|/images)(|/.*)$" { + alias.url += ( "/hastymail" => var.site-dir + "/applications/hastymail2" ) + } + } + + # Enable SSL + $HTTP["host"] == "mail.stdin.nl" { + # Specify the certificate for this domain (uses SNI) + ssl.pemfile = "/etc/lighttpd/ssl/mail.stdin.nl.pem" + ssl.ca-file = "/etc/lighttpd/ssl/ca/startssl-all-ca.pem" + # Redirect HTTP to HTTPS + $HTTP["scheme"] == "http" { + url.redirect = ( "^(.*)" => "https://mail.stdin.nl$1" ) + } + } }