You have an unused upstream
named backend
where you are pointing nothing at the moment. Straight from the Nginx upstream
docs:
upstream backend { server backend1.example.com weight=5; server backend2.example.com:8080 fail_timeout=5s slow_start=30s; server backend3.example.com resolve; server backup1.example.com:8080 backup; server backup2.example.com:8080 backup;}server { location / { proxy_pass http://backend; }}
The port
gets set in the upstream
, not the proxy_pass
directive.