Nginx - FastCGI - No show fastcgi-cache header

Hello everyone
I have configured hestiacp to work with Nginx with PHP-FPM, with the main purpose of using FastCGI cache.

I have configured the default site, basically adding the domain, indicating that I want to use FastCGI and with the template wordpress.tpl. After this, I have run v-add-fastcgi-cache for the user and domain in question and I have seen that files are being stored in /var/cache/nginx/micro/mydomain.com.

So far, it seems that everything is fine, but when I go to see the headers that shows the page, I don’t see fastcgi-cache, which should be in HIT, but it doesn’t even show it :frowning:

Do you know why this happens? It makes me think, that it is not serving the pages in cache :frowning:

Thanks

Hi @dapehe,

That header is not essential to use nginx fastcgi cache, it is useful for debug purposes but there is no need to include it.

If you want to add it (replace YourUser and YourDomain by the actual data):

echo 'add_header X-FastCGI-Cache $upstream_cache_status;' >> /home/YourUser/conf/web/YourDomain/nginx.conf_fcgi-header
ln -sr /home/YourUser/conf/web/YourDomain/nginx.conf_fcgi-header /home/YourUer/conf/web/YourDomain/nginx.ssl.conf_fcgi-header
nginx -t && systemctl reload nginx 

Thank you very much for the information
I have added the header as you indicated, and it works perfectly.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.