You should create a new template for your domain, modify a location block and assign that template to your site.
The templates for Nginx standalone are located here /usr/local/hestia/data/templates/web/nginx/php-fpm/
. If you are using Nginx+Apache, the templates for Nginx are here /usr/local/hestia/data/templates/web/nginx/
Note: In this example I’m using the Nginx standalone.
/usr/local/hestia/data/templates/web/nginx/php-fpm/default.tpl
has this section:
location / {
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
expires max;
fastcgi_hide_header "Set-Cookie";
}
And you must modify it like this:
location / {
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
open_file_cache off;
proxy_cache off;
proxy_no_cache 1;
proxy_cache_bypass 1;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
expires off;
add_header Pragma "no-cache";
etag off;
fastcgi_hide_header "Set-Cookie";
}
Let’s say your user is pxop
, the domain is example.net
and the new template will be newtemplate
cd /usr/local/hestia/data/templates/web/nginx/php-fpm
cp default.tpl newtemplate.tpl
cp default.stpl newtemplate.stpl
Next, edit newtemplate.tpl
and newtemplate.stpl
, and modify the location
directive location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
so that it matches the example provided above.
Once both files have been modified, add the new template to your domain:
v-change-web-domain-tpl pxop example.net newtemplate yes
Now, any changes to your CSS will be reflected instantly, with no caching at all.