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 am having nginx on port 80 and apache on port 8080 on same server.

I have configured nginx such that it act as reverse proxy(i am not sure whether its working or not) using this tutorial

steps i followed to verify proxy.

  • opened same page on two different machines within an interval of 5 seconds.

but in the apache access.log every request is showing 200 response code.Does that indicate that caching is not working?

and nginx access.log is showing nothing.

share|improve this question

The tutorial that you are referring has nothing to do with nginx cache. So, it's definetly that nginx caching is not working if your config is similar to that from tutorial.

But in general, nginx has special variable:

$upstream_cache_status — keeps status of accessing a response cache (0.8.3). The status can be one of “MISS”, “BYPASS”, “EXPIRED”, “STALE”, “UPDATING” or “HIT”.

You can do with this variable whatever you want (e.g. log it into access log, or return it with the response headers).

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.