789456123741 发表于 2018-6-17 18:58:35

请教个NGINX配置问题

SERVER段
include "ssl/${host}.conf";
本意是想弄个通用的配置代码不用每次都去改host的值,但是这样写是不对的。
请教大佬正确的写法是?

mrjoel 发表于 2018-6-17 19:00:21

set $a hello;

include "ssl/$a.conf";

callmefeifei 发表于 2018-6-17 19:01:00

用$host去掉大括号

BGP 发表于 2018-6-17 19:03:43

z再不行就
set $diyhost hostloc.com;

BGP 发表于 2018-6-17 19:05:40


BGP 发表于 2018-6-17 19:03

用$host去掉大括号
这个不行

nginx: open() "/usr/local/nginx/conf/ssl/$host.conf" failed

789456123741 发表于 2018-6-17 19:06:42


BGP 发表于 2018-6-17 19:05

z再不行就
set $diyhost hostloc.com;
这样就没意义了

789456123741 发表于 2018-6-17 19:03:00

这个当然是上春哥新上的lua动态加载证书

holinhot 发表于 2018-6-17 19:07:44


holinhot 发表于 2018-6-17 19:43

这个当然是上春哥新上的lua动态加载证书
地址?

789456123741 发表于 2018-6-17 19:05:00

。。。
页: [1]
查看完整版本: 请教个NGINX配置问题