diff --git a/docs/integration/nginx.md b/docs/integration/nginx.md index 2a9a1a3..1f7c410 100644 --- a/docs/integration/nginx.md +++ b/docs/integration/nginx.md @@ -54,7 +54,7 @@ server { proxy_set_header X-Forwarded-Proto $scheme; # Disable Nginx from converting HEAD to GET - # proxy_cache_convert_head off; + proxy_cache_convert_head off; proxy_connect_timeout 300; # Default is HTTP/1, keepalive is only enabled in HTTP/1.1 @@ -94,7 +94,7 @@ server { proxy_set_header X-Forwarded-Proto $scheme; # Disable Nginx from converting HEAD to GET - # proxy_cache_convert_head off; + proxy_cache_convert_head off; proxy_connect_timeout 300; # Default is HTTP/1, keepalive is only enabled in HTTP/1.1 @@ -115,6 +115,19 @@ server { ``` +#### Important Notice + +> [!WARNING] +> **Key configuration items** +> +> The `proxy_cache_convert_head off` directive **must be added** to the Nginx configuration for the following reasons: +> +> - By default, Nginx converts HEAD requests to GET requests for caching. +> - This conversion will cause S3 V4 signature verification to fail. +> - The symptom is `Bucket not found` or `403 Access Denied` error when accessing the storage bucket. +> +> Refer to [Nginx Official Documentation](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_convert_head)。 + ## 3. Multi-Machine Load Balancing If you need to add multiple RustFS servers in a distributed environment, please adjust DNS resolution or local Hosts addresses in advance, and modify and add servers. @@ -203,4 +216,4 @@ server { proxy_pass http://127.0.0.1:9001; } } -~~~ \ No newline at end of file +~~~