好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Nginx反向代理proxy_cache_path directive is not allowed

尝试使用Nginx进行反向代理过程中出现如下错误:
复制代码 代码如下:
nginx: [emerg] "proxy_cache_path" directive is not allowed here in /etc/nginx/conf.d/default.conf:29

提示意思“proxy_cache_path指令不被允许”,在官网上查找了相关说明,也没有发现问题,最后看应用范围才知道,他只能使用于http{  }部分,把proxy_cache_path放置于http部分即可解决此问题

参见: http://nginx.org/cn/docs/http/ngx_http_proxy_module.html#proxy_cache_path

查看更多关于Nginx反向代理proxy_cache_path directive is not allowed的详细内容...

  阅读:64次