Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

Does it support cgi at all?

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
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
add comment

It does support FastCGI and UWSGI, though.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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