lighttpd: Move webmail from stdout.nl to stdin.nl.
[matthijs/servers/drsnuggles.git] / etc / lighttpd / vhosts / stdin-nl
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" )
+               }
+       }
 }