lighttpd: Enable SSL for mail.stdout.nl.
[matthijs/servers/drsnuggles.git] / etc / lighttpd / vhosts / stdout-nl
1 $HTTP["host"] =~ ".stdout.nl$" {
2         var.site-dir         = var.root-dir + "/stdout.nl"
3         var.site-fcgi-dir    = var.fcgi-dir + "/stdout-nl"
4
5         evhost.path-pattern  = var.site-dir + "/htdocs/%3/"
6         accesslog.filename   = var.site-dir + "/logs/access.log"
7
8         fastcgi.server    = ( ".php" => 
9                 ((
10                         "socket" => var.site-fcgi-dir + "/php",
11                 ))
12         )
13
14         $HTTP["host"] == "mail.stdout.nl" {
15                 alias.url += ( "/squirrel" => "/usr/share/squirrelmail" )
16
17                 # Only expose parts of the hastymail directory
18                 $HTTP["url"] =~ "^/hastymail(|/index.php|/templates|/js|/plugins|/images)(|/.*)$" {
19                         alias.url += ( "/hastymail" => var.site-dir + "/applications/hastymail2" )
20                 }
21         }
22
23         $HTTP["host"] == "mail.stdout.nl" {
24                 # Specify the certificate for this domain (uses SNI)
25                 ssl.pemfile = "/etc/lighttpd/ssl/mail.stdout.nl.pem" 
26                 # Redirect HTTP to HTTPS for mail.stdout.nl
27                 $HTTP["scheme"] == "http" {
28                     url.redirect = ( "^(.*)" => "https://mail.stdout.nl$1" )
29                 }
30         }
31 }