With apache ,I just put my binary under cgi-bin,how about nginx?

Does it support cgi at all?

Nginx does not support CGI, because it does not spawn external processes. This is a design decision: Nginx is a high-performance web server and spawning an external process is rather expensive operation.

  • why support of cgi means spawn external processes? – kernel May 28 '11 at 8:41
  • @kernel because there's no way Nginx is going to embed a way to execute cgi. – Martin Fjordvald May 28 '11 at 9:43
  • why can't nginx use the same way as executing PHP to execute cgi? – kernel May 28 '11 at 9:45
  • @kernel CGI (Common Gateway Interface) implies a script is executed by an HTTP server (RFC 3875, section 3.4: ietf.org/rfc/rfc3875.txt). Apache may execute a PHP script as CGI or using "mod_php" module (which is not CGI obviously) – Alexander Azarov May 28 '11 at 10:35

It does support FastCGI and UWSGI, though.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.