nginx 的配置 不支持逻辑与和逻辑非运算,也不支持if 嵌套,只能用其他方式实现
set $flag 0; if ($host != name) { set $flag "${flag}1"; } if ($host != name2){ set $flag "${flag}1"; } #逻辑与实现方式 if ($flag = "011"){ xxx } #逻辑或实现方式 if ($flag = "01"){ xxx }