'Running executable CGI on NGINX (NOT PHP!)

I have an older web application that uses .cgi script files. These are compiled ELF binaries, directly executable on the system.

I have been able to get these running with a pretty basic Apache configuration on my Windows machine and also using the lighttpd-mod-cgi package on an embedded linux system (where I would like to run it).

I already had NGINX running on the latter, and I was hoping to be able to utilize just NGINX without installing a separate web-server like lighttpd.

I'm very much at a loss here partly because I admittedly don't have a lot of experience with CGI scripts at all. I understand that CGI is a "protocol" and not a language, but every single search I try leads me to results about configuring FastCGI or spawn-fcgi and they all discuss configuring and running PHP scripts.

These are not PHP scripts, they are executables and I would think that I didn't need a separate interpreter.

What is the most straight forward way to configure NGINX to host these CGI files?

I have tried all the above, but am really getting nowhere. I can keep the lighttpd install if any additional components I need for NGINX are likely to be as resource intensive. I just want to know for certain if this is a futile effort or if NGINX has the ability to run executable CGI scripts without additional components.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source