Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted
$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"
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.