title: Load balancing with nginx for FastCGI processes
body: <p>I have one FCGI process and its three instances are running on three different ports.</p>
  
  <p>I am using nginx as reverse proxy server and now I want to use it for load balancing also.  But I don't know how to configure it for fcgi processes.</p>
  
  <p>I have configuration like this: </p>
  
  <pre><code>location /abc {  
      fastcgi_pass backend;
  }
  
  upstream backend {
  
  } 
  </code></pre>
  
  <p>I can use the configuration mentioned in 2nd answer and it also works fine.
  <a href="https://serverfault.com/questions/598202/make-nginx-to-pass-hostname-of-the-upstream-when-reverseproxying">https://serverfault.com/questions/598202/make-nginx-to-pass-hostname-of-the-upstream-when-reverseproxying</a></p>
  
  <p>But I want to know how can I write fcgi process in upstream and how to pass some params to that fcgi process. Main problem is that I have to pass some variables coming through front-end request.</p>