FCGI file's content solely being printed out with NGINX & FAST CGI
<p>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.</p>

<p><a href="https://i.stack.imgur.com/kjebv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kjebv.png" alt="Output"></a></p>

<p>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 <a href="http://www.cgi101.com/book/ch1/text.html" rel="nofollow noreferrer">http://www.cgi101.com/book/ch1/text.html</a> and for Program 1-2: second.cgi - Hello World Program 2, I am getting: </p>

<p><a href="https://i.stack.imgur.com/6YLiS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6YLiS.png" alt="wrong"></a></p>

<p>when the output should be <a href="http://www.cgi101.com/book/ch1/second.cgi" rel="nofollow noreferrer">http://www.cgi101.com/book/ch1/second.cgi</a>.</p>

<p>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?</p>