upstream postgres_backend { server 10.0.0.2:5432; } server { listen 5432; proxy_pass postgres_backend; }