I've searched for this for a while but have not been able to find a solution. How can I configure Apache to run any ELF executable in the web root as a CGI program? For example, if I write and compile a C program and place it as /var/www/something
, I want to be able to visit http://localhost/something
and have Apache run the program, outputting the result, instead of prompting me to download the binary.
Edit: I know how to run CGI programs, and those outside of cgi-bin
, I just want to find out how to run ELF executables with no extension such as .cgi
, possibly using Apache to detect the magic of the file.