How do I specify the location directive to cache my homepage without any filename or extension suffix.

I need to cache only my home page at site.com and not anything under it(i.e site.com/page.php).

1 Answer 1


Declare location with strict match and caching within it:

location = / {
      proxy_pass ...;
      proxy_cache ...;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .