# SyncGames MinIO — reverse proxy snippet for an EXISTING host NGINX. # Include from your main nginx.conf or drop into conf.d/. # # Cloudflare Tunnel should target this host's NGINX (port 80 / 443), not MinIO directly. # Docker Compose binds MinIO to 127.0.0.1:9000 on the NAS. upstream syncgames_minio { server 127.0.0.1:9000; keepalive 32; } server { listen 80; server_name syncgames-s3.example.com; # <-- your Cloudflare hostname client_max_body_size 512m; ignore_invalid_headers off; location / { proxy_pass http://syncgames_minio; proxy_http_version 1.1; proxy_set_header Connection ""; # Critical for SigV4 — do not rewrite Host to localhost proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Authorization $http_authorization; proxy_set_header Content-Type $content_type; proxy_set_header Content-Length $content_length; proxy_set_header Expect $http_expect; proxy_request_buffering off; proxy_buffering off; proxy_connect_timeout 60s; proxy_send_timeout 3600s; proxy_read_timeout 3600s; } }