worker_processes 1; pid /run/nginx.pid; error_log /var/log/nginx/error.log warn; events { worker_connections 256; } http { access_log /var/log/nginx/access.log; client_body_temp_path /var/lib/nginx/body; proxy_temp_path /var/lib/nginx/proxy; server { listen 7860; # ── Redpanda Console UI ────────────────────────── location /ui/ { proxy_pass http://127.0.0.1:8080/ui/; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } # ── Pandaproxy — Kafka REST API ────────────────── location /kafka/ { rewrite ^/kafka/(.*) /$1 break; proxy_pass http://127.0.0.1:8082; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_read_timeout 300s; proxy_send_timeout 300s; } # ── Schema Registry ────────────────────────────── location /schema/ { rewrite ^/schema/(.*) /$1 break; proxy_pass http://127.0.0.1:8081; proxy_set_header Host $host; } # ── Admin API ──────────────────────────────────── location /admin/ { rewrite ^/admin/(.*) /$1 break; proxy_pass http://127.0.0.1:9644; proxy_set_header Host $host; } # ── Health check ───────────────────────────────── location /health { return 200 'ok'; add_header Content-Type text/plain; } # ── Root → redirect to UI ───────────────────────── location = / { return 301 /ui/; } } }