lighttpd: Move webmail from stdout.nl to stdin.nl.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 15 Jun 2010 07:36:47 +0000 (09:36 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 15 Jun 2010 08:22:03 +0000 (10:22 +0200)
etc/lighttpd/lighttpd.conf
etc/lighttpd/vhosts/stdin-nl
etc/lighttpd/vhosts/stdout-nl

index c410fb93533153c079da630b45bb97d97c51b3d7..50d892aa709ff34cb9d7c89dd4f5009d459f17d2 100644 (file)
@@ -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
index cdec07a873d409c2dbe0c2aac0359fb31a1742ba..e3eb78bb0ee3a4138b62bfe66dd2fc76b510a16e 100644 (file)
@@ -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" )
+               }
+       }
 }
index 5ca8a714acf1c0f0fabe205145870dbcd407d99f..98e286e7652b7cc3f6dc46b04384bd45cc191bc2 100644 (file)
@@ -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" )
-               }
        }
 }