9

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?

1 Answer 1

13

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;

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