【发布时间】:2015-08-25 08:31:24
【问题描述】:
我在 Nginx 中有以下 .conf
location / {
if ($uri !~ ^/front/? ){
include ez_params.d/ez_rewrite_params last;
}
include common_auth.conf.inc;
location ~ ^/(index|index_(rest|cluster|treemenu_tags))\.php(/|$) {
#bunch of rules here
}
}
我在这里要做的是从所有 EzPublish 重写规则中排除 /front/ 文件夹。但是,这不仅不起作用,甚至在尝试加载此文件时也会给我一个错误:
"nginx: [emerg] "include" 指令在 /etc/nginx/conf.d/staging-preview.conf:51 中是不允许的 nginx:配置文件 /etc/nginx/nginx.conf 测试失败”
我发现几乎没有使用“if”,请参阅http://wiki.nginx.org/IfIsEvil,但我不明白我应该做什么。
【问题讨论】:
标签: nginx