nginx: [emerg] "proxy_cache_path" directive is not allowed here in /usr/local/nginx/conf/n

Posted 沧海一粟,何以久远

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx: [emerg] "proxy_cache_path" directive is not allowed here in /usr/local/nginx/conf/n相关的知识,希望对你有一定的参考价值。

1、它只能使用于http{  }部分,把proxy_cache_path放置于http部分即可解决此问题。注意图示的上下文

 

以上是关于nginx: [emerg] "proxy_cache_path" directive is not allowed here in /usr/local/nginx/conf/n的主要内容,如果未能解决你的问题,请参考以下文章

nginx: [emerg] "server" 指令在这里不允许

nginx:[emerg]unknown directive "ssl"

nginx: [emerg] "upstream" directive is not allowed

nginx: [emerg] getpwnam("www") failed

django- nginx: [emerg] open() "/etc/nginx/proxy_params" 在 /etc/nginx/sites-enabled/myproje

nginx 启动报错 nginx: [emerg] getgrnam("root") failed