Ssl

結合用於 IPv4 和 IPv6 的 lighttpd 配置

  • April 10, 2015

我的 lighttpd.conf 包括以下幾行:

$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"
}

是否可以將這兩個塊合併為一個?$SERVER["socket"]只允許==而不是=~

$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"
}

你也許可以逃脫:

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

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

引用自:https://serverfault.com/questions/246570