From: Matthijs Kooijman Date: Tue, 15 Jun 2010 07:36:47 +0000 (+0200) Subject: lighttpd: Move webmail from stdout.nl to stdin.nl. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=b3e4ccffd2ec8225fcf8b9fa40a9279e2af3e31b;p=matthijs%2Fservers%2Fdrsnuggles.git lighttpd: Move webmail from stdout.nl to stdin.nl. --- diff --git a/etc/lighttpd/lighttpd.conf b/etc/lighttpd/lighttpd.conf index c410fb9..50d892a 100644 --- a/etc/lighttpd/lighttpd.conf +++ b/etc/lighttpd/lighttpd.conf @@ -75,11 +75,11 @@ $SERVER["socket"] == ":443" { # certificate used by startcom). It seems that even without this # option, it already works, probably because openssl ships some # certificates. But, let's put it here to be safe anyway. - ssl.cafile = "/etc/lighttpd/ssl/ca/startssl-all-ca.pem" - # Use the mail.stdout.nl certificate as the default certificate (for + ssl.ca-file = "/etc/lighttpd/ssl/ca/startssl-all-ca.pem" + # Use the mail.stdin.nl certificate as the default certificate (for # non-SNI browsers and domains without their own certificate), since # it is currently the only one we have anyway. - ssl.pemfile = "/etc/lighttpd/ssl/mail.stdout.nl.pem" + ssl.pemfile = "/etc/lighttpd/ssl/mail.stdin.nl.pem" } #### external configuration files diff --git a/etc/lighttpd/vhosts/stdin-nl b/etc/lighttpd/vhosts/stdin-nl index cdec07a..e3eb78b 100644 --- a/etc/lighttpd/vhosts/stdin-nl +++ b/etc/lighttpd/vhosts/stdin-nl @@ -11,4 +11,23 @@ $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" + # Redirect HTTP to HTTPS + $HTTP["scheme"] == "http" { + url.redirect = ( "^(.*)" => "https://mail.stdin.nl$1" ) + } + } } diff --git a/etc/lighttpd/vhosts/stdout-nl b/etc/lighttpd/vhosts/stdout-nl index 5ca8a71..98e286e 100644 --- a/etc/lighttpd/vhosts/stdout-nl +++ b/etc/lighttpd/vhosts/stdout-nl @@ -11,21 +11,8 @@ $HTTP["host"] =~ ".stdout.nl$" { )) ) - $HTTP["host"] == "mail.stdout.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" ) - } - } - $HTTP["host"] == "mail.stdout.nl" { # Specify the certificate for this domain (uses SNI) ssl.pemfile = "/etc/lighttpd/ssl/mail.stdout.nl.pem" - # Redirect HTTP to HTTPS for mail.stdout.nl - $HTTP["scheme"] == "http" { - url.redirect = ( "^(.*)" => "https://mail.stdout.nl$1" ) - } } }