Bad Performance when using two Nginx behind each other

Ryan Dahl ry at tinyclouds.org
Sat Apr 25 14:09:24 MSD 2009


Why the double tiered setup? Use nginx to serve static content and
then proxy to backend processes (php-fcgi, mongrel or whatever). You
just need different upstreams.

e.g.

upstream site1_mongrels {
   #...
}

upstream site2_mongrels {
  # ...
}

server {
  listen site1.com
  #...
  proxy_pass site1_mongrels;
}

server {
  listen site2.com
  # ...
  proxy_pass site2_mongrels;
}





More information about the nginx mailing list