resolver consul:53 valid=2s; resolver_timeout 2s; upstream backend { zone upstream_backend 64k; server service.consul service=http resolve; } match hello { status 200; header Content-Type = text/html; body ~ "Hello"; } server { listen 80; status_zone backend; location / { proxy_pass http://backend; health_check interval=2s match=hello; } } server { listen 8080; root /usr/share/nginx/html; location /api { api write=on; } location = / { return 301 /dashboard.html; } }