$HTTP["host"] =~ ".stdin.nl$" { var.site-dir = var.root-dir + "/stdin.nl" var.site-fcgi-dir = var.fcgi-dir + "/stdin-nl" evhost.path-pattern = var.site-dir + "/htdocs/%3/" fastcgi.server = ( ".php" => (( "socket" => var.site-fcgi-dir + "/php", "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" ) } } }