Re: $upstream_addr is returning blank

2014-06-19 Thread tsunny
Thanks Valentin V. Bartenev !! I was using it before the line proxy_pass http://xyz.com After placing the code after proxy_pass, I am able to see the values.. Regards, Sunny Posted at Nginx Forum: http://forum.nginx.org/read.php?2,251039,251049#msg-251049

$upstream_addr is returning blank

2014-06-19 Thread tsunny
Hello, I want to access the value of $upstream_addr. Below is the code, location / { echo "up = $upstream_addr"; } The response is just "up = " . What could be the reason for this? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,251039,251039#msg-251039 ___

Passing arguments to os.execute()

2014-06-18 Thread tsunny
Hello, How to send the value of a variable to a shell program using os.execute()? I want to send the value of $uri to my shell program. Below is my code, location / { set_by_lua $result 'os.execute("/tmp/test.sh $uri")'; } If I access $1 in my program, the value is just 'uri' not the va