Nginx cache configuration

Activating Proxy Template “wordpress.tpl” I found two issues, google does not helps.

sudo /usr/local/hestia/bin/v-add-fastcgi-cache admin domain.com 30m yes yes
Error: nginx is in proxy mode
Why? nginx is in php-fpm mode via socket for this domain

instruction
include /home/admin/conf/web/domain.com/nginx.fastcgi_cache.conf*;
has no file to include

Are there some template/ example of this nginx.fastcgi_cache.conf ?

The code checks if Nginx+PHP-FPM is active for the whole server or not.

If so the option is available for rebuild, restore and edit web. If not the software doesn’t under stand it yet. Changing this behaviour would requiring a complete rewrite of Hestia and it yet not in the planning.

If you check the code for v-add-fastcgi-cache you are able to see the template used.

Thanks for the explanation.

The code checks if Nginx+PHP-FPM is active for the whole server or not.
Ok, so I just made changes for every website on this machine like that
Screenshot by Lightshot
Or I should activate it somewhere else?

But just wonder if there is a way to make it globally or not?

BTW I already check the file you point me to. The line

if [ “$WEB_SYSTEM” != ‘nginx’ ]; then
contents variable $WEB_SYSTEM, but echo $WEB_SYSTEM shows empty. A bit strange…

Loads the variable as in /usr/local/hestiacp/conf/hestia.conf

Incase of Apache2 + Nginx

WEB_BACKEND='php-fpm'
WEB_PORT='8080'
WEB_RGROUPS='www-data'
WEB_SSL='mod_ssl'
WEB_SSL_PORT='8443'
WEB_SYSTEM='apache2'

Incase of Nginx + FPM

WEB_PORT='80'
WEB_SSL='openssl'
WEB_SSL_PORT='443'
WEB_SYSTEM='nginx'

If the are not present you should be able to add them safely.

If you want to move from Nginx + Apache2 to Nginx + PHP-FPM
Run this script and it will update all settings as it should be…

Thank you, it helps a lot.
However as I see there is some incompatibility with wp-super-cache plugin, could be it brakes some headers of nginx.

Can you please suggest a way to separate a cache for mobile devices?

Yes. I think that eris had a wp plugin for that?

Not sure.
The only plugin I found is Hestia Nginx Cache By Jakob Bouchard - cache flusher.

BTW I suggest to add this block to nginx templates

        #Don't cache POST requests
        if ($request_method = POST) {
            set $no_cache 1;
        }

Currently working on:

But it works with the fact the that a few custom modules are loaded an configured in a special way.

Thanks, but the question was NOT about purging

Can you please suggest a way to separate a cache for mobile devices?

I meant to keep two versions of the cache, one for mobile, one for desktop