liu-shaobo 发表于 2011-09-06 09:51

nginx valid_referers bug

valid_referers nome blocke *.test.com;
    if ($invalid_referer) {
      return 404;
}

注意红色部分,用nginx -t 检查语法时,竟然没有报错;
# /usr/sbin/nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

lax 发表于 2011-09-06 14:16

为什么要报错呢?红色部分被认为是hostname了

liu-shaobo 发表于 2011-09-08 18:49

回复 2# lax


    none 不是本来就有的参数吗

iptws 发表于 2011-09-08 21:51

运维群:168572651
欢迎各位新手加入,一起学习集群一起学习运维
页: [1]
查看完整版本: nginx valid_referers bug