By paulportelli
Hi,
I’m currently experimenting with a WordPress installation in DO App Platform and I’m running into an issue where I cannot get FastCGI to work at all. I mean Nginx is serving the pages well
I followed several articles I found online, mostly this one which points to a sample configuration file here but from several different tests I did (using curl or third party stress test tools), I can confirm that the content served is not cached at all.
Would anyone be able to provide sample configurations or valid pointers that could potentially help me in setting this up correctly?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The http response headers should have cache-control settings. The headers are visible if you do curl -v <url>. The app platform will use default settings if it isn’t found. The defaults are to prevent caching on services (as they usually have dynamic content), and static sites default to allowing caching for a while (like a day or so).
There may be a couple of places to set the cache-control headers. The headers could be set in the php code, or by nginx. There are advantages and disadvantages to each approach. Php code can provide greater flexibility to headers if different pages need different settings. It may require some more complex code to be written. Using nginx is usually a simple configuration, which can be good for things like static assets (javascript, css, images) that don’t need to be processed by the php process. A hybrid approach may be needed to get the best results.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.