Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was looking at the setup of reverse proxies, like nginx in front of apache, to reduce load on webservers for serving static content.

For any given URL, our web pages will have different parts static and dynamic. How do reverse proxies know when to serve resources themselves, or pull it from the source web server behind them? Obviously things like images and javascript files are static, but even some of those, like captchas, are dynamically generated. Our drupal sites actually look at the path in the url and serve different content accordingly, taking path elements as arguments.

Does it simply require a lot of configuration on the reverse-proxy side, with the configurator having deep knowledge about which parts of the site are dynamic versus static?

share|improve this question
up vote 4 down vote accepted

Reverse proxies can distinguish static contents from dynamic ones the same way forward proxies do: using caching informations in the HTTP headers.

HTTP includes some fields specifically to tell browsers (and proxies) what can be cached and for how much time; reverse proxies can (and do) analyze these fields in order to know when cached responses expire.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.