Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
by Rookie
I would like to remove the header

cache-control:public, no-cache

I am trying to set up Cloudflare cache but this header not letting it cache.

I already removed it from headers-html.conf but it is still coming.

2 Answers

+1 vote
by Expert

You are correct, just remove it from "headers-html.conf", that's enough!

Just remember two things:

  • You should restart Nginx after this, to changes take effect.
  • This file will be overwritten after some Webinoly updates, not always, just when the stack is updated.
0 votes
by Rookie

Actually, I found the source of this problem. On a system, with low ram, the tmpfs memory is set to 5% or 10%. This issue cause to remain out of memory soon if you have a site that has a lot of pages. 

If you make df -h you will see the tmpfs is at 100%

Cache-control header is correct but, because the system is out of memory you will receive every time a newly created page. 

The solution is to raise the tmpfs memory and the Cloudflare will receive the cached page. 

To make this do: sudo nano /etc/fstab and edit this with the amount of ram you need. In my case, I raised this value to 30% and all works ok.  

tmpfs /run tmpfs noexec,nosuid,size=30%,mode=0755 0 0

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.