4

My lighttpd.conf includes the following lines:

$SERVER["socket"] == "188.40.236.66:443" {
   ssl.engine  = "enable" 
   ssl.ca-file = "/etc/lighttpd/ssl/startcom.ca.pem"
   ssl.pemfile = "/etc/lighttpd/ssl/www.unixforces.net.pem"
}   

$SERVER["socket"] == "[2a01:4f8:100:30a5:0:bc28:ec43:2]:443" {
   ssl.engine  = "enable"
   ssl.ca-file = "/etc/lighttpd/ssl/startcom.ca.pem"
   ssl.pemfile = "/etc/lighttpd/ssl/www.unixforces.net.pem"
}

Is it possible to combine these two blocks into one? $SERVER["socket"] only allows for == and not =~.

2 Answers2

4
$SERVER["socket"] == "188.40.236.66:443" {
   include "/etc/lighttpd/unixforces.net.conf"
}   

$SERVER["socket"] == "[2a01:4f8:100:30a5:0:bc28:ec43:2]:443" {
   include "/etc/lighttpd/unixforces.net.conf"
}
user1686
  • 10,162
  • 1
  • 26
  • 42
0

You might be able to get away with:

$SERVER["socket"] == "[::]:80" { }
ssl.engine  = "enable" 
ssl.ca-file = "/etc/lighttpd/ssl/startcom.ca.pem"
ssl.pemfile = "/etc/lighttpd/ssl/www.unixforces.net.pem"

from http://utcc.utoronto.ca/~cks/space/blog/linux/LighttpdIpv6