<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>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.</p>
<p>(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.)</p>
<p><br>
</p>
<p>Thomas</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 8/10/21 10:17 PM, Viete wrote:<br>
</div>
<blockquote type="cite"
cite="mid:69ef7838d7bbbd33affbdf701fef0499.NginxMailingListEnglish@forum.nginx.org">
<pre class="moz-quote-pre" wrap="">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: <a class="moz-txt-link-freetext" href="https://forum.nginx.org/read.php?2,292183,292183#msg-292183">https://forum.nginx.org/read.php?2,292183,292183#msg-292183</a>
_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a>
</pre>
</blockquote>
</body>
</html>