Nginx reverse proxy proxy_cache_path directive is not allowed error resolution

  • 2020-05-09 19:53:36
  • OfStack

The following error occurred when trying to use Nginx for reverse proxy:


nginx: [emerg] "proxy_cache_path" directive is not allowed here in /etc/nginx/conf.d/default.conf:29

"proxy_cache_path instruction is not allowed", I looked up the relevant instructions on the official website, and found no problem. At last, I saw the application scope, I knew that he could only use http{ } part, and put proxy_cache_path in http part to solve this problem

. See also: http: / / nginx org/cn/docs/http/ngx_http_proxy_module html # proxy_cache_path


Related articles: