Combine lighttpd configs for IPv4 and IPv6

Posted by mrothe on Server Fault See other posts from Server Fault or by mrothe
Published on 2011-03-12T12:31:54Z Indexed on 2011/03/12 16:12 UTC
Read the original article Hit count: 335

Filed under:
|
|
|

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 =~.

© Server Fault or respective owner

Related posts about ssl

Related posts about lighttpd