Using Nginx as a Load Balancer

Nginx is a relatively new web server that has a light footprint and relatively easy configuration. The following configuration demonstrates how to properly use nginx as a load balancer in front of two web servers. pid /var/run/; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 75; proxy_buffering off; log_not_found off; error_log /dev/null; access_log off; proxy_connect_timeout 20; client_header_timeout 60; client_body_timeout 60; send_timeout 60; server { listen 127.