ZC-10966 - how to add use_temp_path=off to proxy_cache_path in NGINX with Reverse Proxy
Added "use_temp_path" : "off", to /etc/nginx/ea-nginx/cache.json ran /scripts/ea-nginx conf --all as per the instructions, but "use_temp_path" : "off" doesnt get added in: /etc/nginx/conf.d/users/myusername.conf
Cpanel allows for like for example: "inactive_time" : "3600m" and "zone_size" : "1000m" in /etc/nginx/ea-nginx/cache.json, but it doesn't recognize "use_temp_path" : "off"
Cpanel does not allow to add proxy_cache_path (where "use_temp_path" : "off" is included) in a custom domain conf file like /etc/nginx/conf.d/users/myusername/mywebsite.com/website.conf I get error when trying this option that says proxy_cache_path is not allowed in the custom doaminconf file
So in which file or how to make Cpanel to add "use_temp_path" : "off" to proxy_cache_path in the username conf file
I want to add use_temp_path=off as recommended here:
-
Hi,
I had the same problem. You can "hack" it by adding the parameter using "levels" like this:
{
"enabled" : true,
"inactive_time" : "60m",
"levels" : "1:2 use_temp_path=off",
"logging" : false,
"proxy_cache_background_update" : "on",
"proxy_cache_lock" : "off",
"proxy_cache_min_uses" : 1,
"proxy_cache_revalidate" : "on",
"proxy_cache_use_stale" : "error timeout http_429 http_500 http_502 http_503 http_504",
"proxy_cache_valid" : {
"200 301 302" : "60s",
"404" : "30s"
},
"x_cache_header" : false,
"zone_size" : "10m"
}And then execute a rebuild.
You'll get this in your users/user.conf file:
proxy_cache_path /var/cache/ea-nginx/proxy/wordpresstest levels=1:2 use_temp_path=off keys_zone=wordpresstest:10m inactive=60m;
Oh yeah.
0
Please sign in to leave a comment.
Comments
1 comment