I'd like to have 1 web server (nginx) and 2 FastCGI instances of the same application as back-end. The idea is to forward requests to second one if the first one is down.
Apparently, I need to use upstream and fastcgi_next_upstream. But I could not find a working example of a nginx.conf file. Does anybody have such example?
http://wiki.nginx.org/HttpUpstreamModule
http://wiki.nginx.org/HttpFcgiModule
upstream backend {
server main_backend.server:port1;
server backup.server:port2 backup;
}
fastcgi_pass backend;