I'm not sure if this is even possible but can I show the stdout of a linux command via webserver?
The command I want to run is echo 'status' | nc localhost 4730
which returns a string with status of the gearman job server.
$echo 'status' | nc localhost 4730
function1 0 0 0
function2 0 0 1
My server's running nginx. I want to open a URL like http://domain.tld/gearman-status and it should return the current status by running that command.
What should I put in the location block of nginx to do that?
location /gearman-status {
?
}
Thanks