Welcome! Log In Create A New Profile

Advanced

Re: Modern alternative to CGI/FastCGI

Thomas Ward
August 10, 2021 11:16PM
Why not build your C++ backend to have a web listener that you can
handle responses directly with?  Typically speaking, a lot of REST APIs
I see are designed to accept HTTP and then have nginx or similar
reverse_proxy requests to them to the API is (indirectly) exposed to
port 80 (HTTP) or 443 (HTTPS), and then nginx facilitates the
communication between the requesting client and the backend, without
requiring CGI / FastCGI to do it.

(This however is an application development question, moreso than an
nginx one, as to how you would go about handing the communication to the
client via NGINX, though proxy_pass and straight HTTP request/URL
handling on your application is going to be simpler than trying to find
a 'scripting' solution like CGI or FastCGI; you'll find a lot of current
web frameworks like Django, etc. behave this way, accepting a proxy_pass
or similar (or a uwsgi integration) to handle the handoff between NGINX
and the application.)


Thomas


On 8/10/21 10:17 PM, Viete wrote:
> Hello, I am using nginx and trying to add REST API. I need to have C++
> backend respond to the REST API calls. What are my modern options other than
> CGI/FastCGI old technology that seems to be unmaintained anymore.
>
> Thank you!
>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,292183,292183#msg-292183
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Modern alternative to CGI/FastCGI

Viete August 10, 2021 10:17PM

Re: Modern alternative to CGI/FastCGI

Thomas Ward August 10, 2021 11:16PM

Re: Modern alternative to CGI/FastCGI

Viete August 11, 2021 11:57PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready