Похожие чаты

Is there anyone out here who know how to make

an nginx endpoint that executes a shell script and returns its stdout in a HTTP response?

9 ответов

25 просмотров

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

Zefir- Автор вопроса
Sharuzzaman Ahmat Raslan
nginx not suppose to be an API server. you need to...

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

Zefir- Автор вопроса
Sharuzzaman Ahmat Raslan
https://github.com/ruudud/cgi

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

Zefir
I was hoping to avoid the Lua module. Not because ...

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.

Zefir- Автор вопроса
Sharuzzaman Ahmat Raslan
use OpenResty then: Binary Packages OpenResty® ...

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

Zefir
There's gonna be more problems with that. We have ...

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?

Zefir- Автор вопроса
Sharuzzaman Ahmat Raslan
can always open a new request to get it approved. ...

easy for you to say "oh, just make request get it approved"

Zefir
easy for you to say "oh, just make request get it...

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

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта