an nginx endpoint that executes a shell script and returns its stdout in a HTTP response?
nginx not suppose to be an API server. you need to pass that into a CGI environment that will run the Bash script. else, install Lua module for Nginx (which makes your webserver OpenResty). look here: https://github.com/openresty/lua-nginx-module
https://github.com/ruudud/cgi
I was hoping to avoid the Lua module. Not because it's bad, but because it will require compiling. I'm on RHEL9 UBI fwiw
Thank you, this sounds like the way to go. By the way, what does CGI stand for? I was googling that earlier when I got similar answers from just searching, and the results told me it's Computer Generated Images... not quite buying that
use OpenResty then: Binary Packages OpenResty® provides official pre-built packages for some of the common Linux distributions (Ubuntu, Debian, CentOS, RHEL, Fedora, OpenSUSE, Alpine, and Amazon Linux). Make sure you have checked out these binary packages first if you are on Linux.
There's gonna be more problems with that. We have a policy at our workplace that everything that will be a persistent service must be approved into a Tech Menu. As far as I know nginx is allowed, but I'm not sure OpenResty is approved. This is another reason why I want to avoid this
can always open a new request to get it approved. maybe the person in power does not know OpenResty exist, but if it help with your job, why hesitate?
easy for you to say "oh, just make request get it approved"
yup. that is how my previous company work. tech is evolving, and the person in power does not know everything. we as the worker will suggest what works with our work
Обсуждают сегодня