I have looked with this for some time but haven't been capable of finding an answer. How do i configure Apache to operate any ELF executable within the web root like a CGI program? For instance, basically write and compile a C program and put it as being /var/www/something, I wish to have the ability to visit http://localhost/something and also have Apache run this program, outputting the end result, rather than compelling me to download the binary.

Edit: I understand how to operate CGI programs, and individuals outdoors of cgi-bin, Among the finest to discover how you can run ELF executables without any extension for example .cgi, possibly using Apache to identify the miracle from the file.

What about while using files directive to whitelist your executable names?

<files something>
  SetHandler cgi-script
</files>

Or better, are you able to invest your executables right into a single known subdirectory?

<location /exec>
  SetHandler cgi-script
</location>