pid /tmp/nginx.pid; error_log /dev/stderr warn; events { worker_connections 128; } http { client_body_temp_path /tmp/client_body; proxy_temp_path /tmp/proxy; fastcgi_temp_path /tmp/fastcgi; uwsgi_temp_path /tmp/uwsgi; scgi_temp_path /tmp/scgi; log_format evidence escape=json '{"time":"$time_iso8601","id":"$request_id","method":"$request_method","uri":"$uri","status":$status,"request_time":$request_time,"upstream_status":"$upstream_status","upstream_time":"$upstream_response_time"}'; access_log /dev/stdout evidence; server { listen 8080; server_name localhost; absolute_redirect off; root /srv; add_header X-Request-ID $request_id always; location = /health { return 200 'ready\n'; } location = /inspect { default_type application/json; return 200 '{"method":"$request_method"}\n'; } location = /r301 { return 301 /inspect; } location = /r302 { return 302 /inspect; } location = /r303 { return 303 /inspect; } location = /r307 { return 307 /inspect; } location = /r308 { return 308 /inspect; } location = /unavailable { add_header Retry-After 2 always; return 503; } location = /broken { proxy_pass http://127.0.0.1:1; proxy_next_upstream off; } location = /slow.bin { limit_rate 1024; } location = /asset.txt { etag on; add_header Cache-Control 'public, max-age=30'; } } }