Storing $server_addr in a variable VS using it directly in location block

itpp2012 nginx-forum at nginx.us
Wed Jul 15 11:45:34 UTC 2015


Valentin V. Bartenev Wrote:
-------------------------------------------------------
> On Tuesday 14 July 2015 21:46:58 justink101 wrote:
> > According to the documentation getting the value of $server_addr to
> set a
> > response header makes a system call, and can impact performance
> > negativelyset $ip $server_addr;

> No, it wouldn't.  The "set" directive also is executed on every
> request.

Via map as well ? (geo would suffer as well then)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,260304,260320#msg-260320



More information about the nginx mailing list