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'm setting up an nginx - apache reverse proxy where nginx handles the static files and apache the dynamic. I have a search engine and depending on search parameter I either directly forward the user to the page they are looking for or provide a set of search results.

I cache these results in memcached as

value: LOCATION:


value: CONTENT-TYPE: text/html


I can pull the "Content-type...." values out of memcached using nginx and send them to the user, but I can't quite figure out how to handle a returned value like "Location..."

Can I?

share|improve this question

From what I can tell, the nginx memcached module can only store the raw contents of the request, be it a gif, html, whatever. It would be unable to interpret your LOCATION parameter without hacking the module up. (Not recommended)

To use nginx in this manner you would have to use memcached to store the actual html content of the page specified by the LOCATION field, and store that in your memcached instead, or use a set of redirects in another manner.

share|improve this answer

Your Answer


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