Nginx cache bypass

Is the $no_cache variable and wp cooke and session section of the nginx.conf not set up fully? On a default install they don’t do anything, and looking in the confs it doesn’t look like everything needed is there?

Also I can’t seem to override this part of the conf for /wp-admin/ Like nothing has worked…

location / {
proxy_pass https://xxxxxxxx
location ~* ^.+.(webp|jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|ttf|otf|woff|woff2|json|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav|wma|3gp|avi|flv|m4v|mkv|mov|mpeg|mpg|wmv|exe|iso|dmg|swf|css|exe|pdf|doc|xls|ppt|txt|odt|ods|odp|odf|tar|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
root /home/xxxxxxxxxxx/public_html;
access_log /var/log/apache2/domains/xxxxxxxxxlog combined;
access_log /var/log/apache2/domains/xxxxxxxm.bytes bytes;
expires max;
try_files $uri @fallback;
}
}

Currently I am using the following template the cacheing template found in /usr/local/hestia/data/templates/web/nginx/

For me it works fine on a heavy wordpress site.

The no cache part:

location / {
    proxy_pass      http://%ip%:%web_port%;

    proxy_cache cache;
    proxy_cache_valid 15m;
    proxy_cache_valid 404 1m;
    proxy_no_cache $no_cache;
    proxy_cache_bypass $no_cache;
    proxy_cache_bypass $cookie_session $http_x_update;

    location ~* ^.+\.(%proxy_extentions%)$ {
        proxy_cache    off;
        root           %docroot%;
        access_log     /var/log/%web_system%/domains/%domain%.log combined;
        access_log     /var/log/%web_system%/domains/%domain%.bytes bytes;
        expires        1h;
        try_files      $uri @fallback;
    }
}

I had to stop using the caching template cause it aggressively cached my wp admin

that block is setting cache control headers for a year on wordpress admin. I tried to override it but i can only get the page not the assets to change

Assets are not chanced due to the log expires time.

Decrease it to zero or maybe 5min. How ever it would be better if Hestia could support https://github.com/FRiCKLE/ngx_cache_purge

That is “Mod_Expires” equivalent. It may be under the log directory line but it is not an expires setting for logs. It sets the may time on cache control headers.