In Nginx, can I handle both a location:url or a content-type: text/html response from memcached?
Posted
by Sean Foo
on Server Fault
See other posts from Server Fault
or by Sean Foo
Published on 2010-04-10T04:06:29Z
Indexed on
2010/04/10
4:13 UTC
Read the original article
Hit count: 306
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
key:/search.cgi?q=foo
value: LOCATION:http://www.example.com/foo.html
and
key:/search.cgi?q=bar
value: CONTENT-TYPE: text/html
<html>
....
....
</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?
© Server Fault or respective owner