How to configure nginx to serve static contents from RAM?

If it’s static content then it will be cached in memory by default (unless there isn’t any memory left), just not by nginx, but OS – all that will be left disk-side will be stat().

If you want 100% memory solution you can just configure ramdisk and serve data from there.

Leave a Comment