GeoIP Question - Speed & efficiency

Igor Sysoev is at
Sat Aug 16 15:34:43 MSD 2008

On Sat, Aug 16, 2008 at 05:27:47PM +0700, Chris Savery wrote:

> >All nginx variables are evaluated on demand only, therefore geo variables
> >are looked up only if they are really used in a request.
> Ok. Excellent, so if I only include the fastcgi param line for one 
> location, say for index.php then it would only evaluate under that 
> condition to pass thru to php, like this:
> fastcgi_param  COUNTRY      $geo;
> Which is easy then...

Yes. Actually even if you set fastcgi_param on http level, it will eventually
be inherited on all localtions level (unless overridden), but it will execute
only when fastcgi_pass directive will start to work.

Igor Sysoev

More information about the nginx mailing list