atom feed16 messages in ru.sysoev.nginxRe: Use nginx to call shell script - ...
FromSent OnAttachments
John MooreMar 8, 2011 4:07 am 
agentzhMar 8, 2011 4:19 am 
António P. P. AlmeidaMar 8, 2011 10:59 am 
John MooreMar 9, 2011 10:42 am 
Richard KearsleyMar 9, 2011 11:15 am 
John MooreMar 9, 2011 12:39 pm 
agentzhMar 9, 2011 7:38 pm 
agentzhMar 9, 2011 7:52 pm 
Elena ZwetkowMar 10, 2011 12:16 am 
agentzhMar 10, 2011 12:28 am 
Elena ZwetkowMar 10, 2011 1:01 am 
agentzhMar 10, 2011 1:33 am 
Alexander KunzMar 15, 2011 3:14 pm 
agentzhMar 15, 2011 7:28 pm 
Alexander KunzMar 16, 2011 12:22 am 
agentzhMar 16, 2011 12:36 am 
Subject:Re: Use nginx to call shell script - simplest way?
From:Richard Kearsley (Rich@m247.com)
Date:Mar 9, 2011 11:15:07 am
List:ru.sysoev.nginx

Can't get much simpler than that lua example... Agentzh, I'm not too familiar with lua but your module helped me do something
really important that I needed. Is that os.execute a lua feature or an nginx_lua
feature? I'm sure there are a lot more ways it can be useful. Any plans to post
up more examples that would suprise us with what's possible?

Sent from my iPhone

On 9 Mar 2011, at 18:53, John Moore <gra@jmsd.co.uk> wrote:

On 08/03/11 12:19, agentzh wrote:

Using ngx_lua [1]:

location /restart-java-app { content_by_lua 'os.execute("/bin/restart-my-java-app")'; }

But it's blocking, only suitable for personal use ;)

Thanks for the suggestion. It's probably rather more than I need, though, and
looks a little complex to set up. At the moment I'm leaning towards simply
proxying to thttpd, which is very lightweight and can do CGI, so I can call a
shell script directly.