I have a server configured to proxy by setting:
proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=backcache:8m max_size=20g inactive=7d;
proxy_cache_key "$scheme$request_method$host$request_uri$is_args$args";
Despite this, when I start nginx, I end up with /var/lib/nginx/proxy as well. BOTH started filling up and eventually the hard drive filled up.
If I try making my proxy_cache_path point to /var/lib/nginx/proxy instead, I get the error:
nginx: [emerg] the same path name "/var/lib/nginx/proxy" used in /etc/nginx/conf.d/proxy.conf:1 and in /etc/nginx/nginx.conf:62
nginx: configuration file /etc/nginx/nginx.conf test failed
Line 62 of nginx.conf is just the end of the http{} section, so I assume this is complaining about the "default" that I'm attempting to override.
I can't figure out how to disable this proxy config which appears to be duplicating the explicit config I've set up. Is there a way to override/remove that default proxy configuration?