Похожие чаты

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 ответов

6 просмотров

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

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

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

Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
75
I love the passion, really do. I do think this is being blown way out of proportion. We are not deleting our Telegram or not allowing you to talk about anything you want, a...
Mike Herron
3
Did you guys see the latest tweet from TonGifts? 🚀
Mike
44
Hey guys, did you see the latest announcement about $FUN? 🔥
Brian
21
Question: when will have qnt holders a tool to stake tokens in lcx? Answer, Verdian: yes soon.
David Ch
14
Did kadena deliver anything on time?
Femboi Uwu
23
Коллеги, доброе утро. Запустил на удаленном хосте приложение (ручками зашел туда по ssh и запустил, не командой удаленно). Создал потом ssh-туннель, и с моей машины приложение...
Δημήτηρ
9
Всем привет, подскажите/посоветуйте пожалуйста. Фаердак компоненты, имею одно место где бизнес хочет видеть при открытии формы список всех клиентов, это порядка 30к. Мои дово...
Sasha Sch
14
Hey guys Long term LINK holder here (All in for the past 5 years). I actually tried not to pay too much attention anymore and just let my thesis play out. But seeing that fili...
Koala Chud
9
Ребят, если кто в курсе - скажите, а в загранке такое же засилье маркетплейсов? или там простые сермяжные интернет-магазины живут попроще?
Андрей [aharito] Харитонов
12
Карта сайта