lighttpd: Update SSL configs
[matthijs/servers/drsnuggles.git] / etc / lighttpd / vhosts / stdin-nl
1 $HTTP["host"] =~ ".stdin.nl$" {
2         var.site-dir         = var.root-dir + "/stdin.nl"
3         var.site-fcgi-dir    = var.fcgi-dir + "/stdin-nl"
4
5         evhost.path-pattern  = var.site-dir + "/htdocs/%3/"
6
7         fastcgi.server    = ( ".php" => 
8                 ((
9                         "socket" => var.site-fcgi-dir + "/php",
10                         "broken-scriptfilename" => "enable",
11                 ))
12         )
13
14         $HTTP["host"] == "mail.stdin.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         # Enable SSL
24         $HTTP["host"] == "mail.stdin.nl" {
25                 # Specify the certificate for this domain (uses SNI)
26                 ssl.pemfile = "/etc/lighttpd/ssl/mail.stdin.nl.pem" 
27                 ssl.ca-file = "/etc/lighttpd/ssl/ca/startssl/all.pem"
28                 # Redirect HTTP to HTTPS
29                 $HTTP["scheme"] == "http" {
30                     url.redirect = ( "^(.*)" => "https://mail.stdin.nl$1" )
31                 }
32         }
33 }