I'm on Mac OS. When I go to http://localhost:8085 in my web browser I see my Nginx server working correctly but my backend configured like:
frontend api_gateway
bind :8080
mode http
default_backend nginx
backend nginx
mode http
server nginx localhost:8085
When going to http://localhost:8080 I'm getting the error:
503 Service Unavailable
No server is available to handle this request.
In my case this was due to Nginx listening on
127.0.0.1which is an IPv4 address but HAProxy was connecting on::1the IPv6 address.To fix it I changed the line from
to
Although another option would be to configure Nginx to listen on IPv6 as well.