Modern alternative to CGI/FastCGI

Thomas Ward teward at
Wed Aug 11 03:15:38 UTC 2021

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.)


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:,292183,292183#msg-292183
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list