Use nginx to call shell script - simplest way?

John Moore grails at
Wed Mar 9 21:43:10 MSK 2011

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.

More information about the nginx mailing list