HTTP GEO Module and Memcached Module question

Liang Jin mywebadmin at
Sat Apr 28 20:46:21 MSD 2007

Hi, I started experimenting the HTTP GEO Module and Memcached Module
from nginx, and have two questions:

1. HTTP GEO Module

in the http configuration, i added something like this to detect the
IP address of the client and store the country code in the $geo

geo  $geo  {
    default          US;     US;      UK;

But the question is how I can transfer the variable to the backend
Apache server and let the PHP script know about the $geo variable. I
understand that for fastcgi you can get $geo as a parameter, just like

fastcgi_param GEO	 		$geo;

However, for reverse_proxy to Apache, how can I pass the $geo variable
on to the Apache server and eventually the PHP script?

2. Memcached Module

Using 0.5.9 version, I have succeeded in making the memcache module
query and fetch the key value stored in Memcached.

For example, if I set the key value in memcached in text format as
"whatever", nginx can query and get the value and feed it back to the
client browser. However, the question is: even if the text is valid
HTML, the browser still thinks it is data, not web pages, so it offers
me to download. I guess I need to set extra headers before the HTML in
order to make it work, but I cannot find any information on this.



More information about the nginx mailing list