How to run CGI-C in Mac?
What must I do to run CGI-C scripts in Mac?
We were required in class to use CGI for the server-side processing of HTML. And we use the C programming language.
Anyway, so what I did was that I made an HTML file in Documents with form action='/Library/WebServer/CGI-Executables/sample3.cgi', made a C file and compiled it in CGI (sample3.cgi). I saved this in /Library/WebServer/CGI-Executables but when I ran the HTML file and clicked some buttons, it opened the folder instead and did not execute the CGI file. My professor said something about setting up a web server first, but he didn't exactly tell me how, why and how it was going to help with anything. Can anyone tell me the best thing that I should do in step-by-step? Or if there was something wrong with the directories I used? Thaank you.
For additional info, I use 2013 MacBook Air, the gcc compiler for C and Xcode as my editor.
MacBook Air, OS X Mavericks (10.9.4)