Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 would like to see which objects get cached by my nginx reverse proxy (with an apache as a backend). So far I could not find a way, only the info that its not implemented yet.

The reason is that I would like to tweak my configuration for best performance without putting too much stress on the server, as the backend is a production system. I know benchmarking would be better, but its not an option right now. So I though an alternative measure would be to monitor the cache.

Is that possible, and if yes, how? (despite patching nginx with the patch mentioned in the link above)

share|improve this question
up vote 0 down vote accepted

Nginx saves the cached files at the Proxy_cache_path folder. The files are named by the md5 ooutput of the proxy url.

Please note that nginx saves the proxy header on the cached file. So it might be hard to check pictures.


share|improve this answer
I finally found the folders in my proxy_cache_path growing, so I have an idea of the amount of data that is cached. But for finer tuning it would be interesting of have a log or debug option. – Isaac Jun 12 '12 at 12:11
  • Nginx saves the cached files at the proxy_cache_path folder.
  • The files are named after the md5 output of the proxy_cache_key (rather than the md5 output of the proxy url).

You can actually easily verify that by yourself: just open one of the files in your proxy_cache_path folder and run md5sum on the key:

$ cat /var/cache/nginx/d/be/54a355887f2e4391a6e0cb9150ae3bed
KEY: https://test/style.css
HTTP/1.0 200 OK
Strict-Transport-Security: max-age=31536000; includeSubDomains
$ echo -n https://test/style.css | md5sum
54a355887f2e4391a6e0cb9150ae3bed  -
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.