I need to serve some FCGI scripts (via WSAPI, but that is irrelevant) from nginx.
Currently I'm using spawn_fcgi to do this. This is the only solution I've found.
I need to know my other options. Are there any other ways to run FastCGI under nginx?
I personally prefer to decouple my FCGI processes from the webserver as much as possible, and manage them as I would any other daemon. In my case, I've switched all of that sort of thing to use daemontools, because it's small, lightweight, is very reliable, and does exactly what you need in this instance, with no mess or fuss.
Yet again nobody mentioned php-fpm. It's now bundled with php itself so you should read docs about php-fpm in PHP manual.
Potentially there's cgi-fcgi. What don't you like about the current method you're using?
Theoretically, there are 3 options how PHP can be attached to nginx:
There's 2 methods of creating these FCGI processes:
spawn script is not evil, really :)
P.S. Походу, самый пытливый ум у русских ;)