0

I had a hopefully quick question regarding how to successfully execute CGI files under the NGINX web server with FAST CGI. Right now, I have Nginx successfully set up and I also believe that I have FAST CGI set up as when I run a .php file with phpinfo(), I am directed to this page which states that my server API is indeed FPM/FASTCGI.

Output

On a side note, when the fcgi file is being called on, solely the contents of the fcgi file are being printed. All the code is being printed out. For example, I looked at the website http://www.cgi101.com/book/ch1/text.html and for Program 1-2: second.cgi - Hello World Program 2, I am getting:

wrong

when the output should be http://www.cgi101.com/book/ch1/second.cgi.

I researched this issue but there were only solutions for apache, nothing for nginx. Anyone have any experience with this in the past and how to go about it?

trynacode
  • 361
  • 1
  • 8
  • 18
  • Possible duplicate of [How to run CGI scripts on Nginx](http://stackoverflow.com/questions/11667489/how-to-run-cgi-scripts-on-nginx) – Richard Smith Jun 25 '16 at 09:06
  • It's not a duplicate. That question has to do with how to setting up some protocol that will partner with web servers. I've already done that, as explained in the question where you can see FASTCGI is being used as the server API. My question has to do with the fact that even though I have FAST CGI set up, whenever I run a CGI script, the browser solely outputs the code of the CGI script. Therefore, I was wondering if there was anything in the .conf file or other file that I had to edit. Long story short, different question entirely. – trynacode Jun 26 '16 at 19:05

0 Answers0