defaults
  log global
  mode http
  option httplog
  retries 3
  option redispatch
  maxconn 2000
  timeout connect 5s
  timeout client 50s
  timeout server 50s

  # Allow keep-alive connections with the internet client, but not with backend
  # servers. Without this, backend servers keep connections alive which means
  # HAProxy's backend processing rules get skipped on subsequent requests.
  option http-server-close

frontend public_router <%= domain %>:80
  option forwardfor

  # Requests starting with /api get sent to the auth proxy for authentication
  # and rate limiting.
  acl url_match_api path_beg /api/
  use_backend auth_proxy_farm if url_match_api

  # All other requests go to our main site.
  use_backend public_site_farm

frontend public_router <%= domain %>:80
  option forwardfor

  # Requests starting with /api get sent to the auth proxy for authentication
  # and rate limiting.
  acl url_match_api path_beg /api/
  use_backend auth_proxy_farm if url_match_api

  # All other requests go to our main site.
  default_backend public_site_farm

Move defaults into system directory so they're prefixed before all frontends. Fix default backend call.
Move defaults into system directory so they're prefixed before all frontends. Fix default backend call.
