2

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

Does it support cgi at all?

2 Answers 2

4

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.

4
  • why support of cgi means spawn external processes?
    – kernel
    May 28, 2011 at 8:41
  • @kernel because there's no way Nginx is going to embed a way to execute cgi. May 28, 2011 at 9:43
  • why can't nginx use the same way as executing PHP to execute cgi?
    – kernel
    May 28, 2011 at 9:45
  • 1
    @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) May 28, 2011 at 10:35
0

It does support FastCGI and UWSGI, though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .