Skip to content

Commit 9f59b05

Browse files
authored
fix: enable proxy_cache_convert_head off and add tips at nginx config (#81)
Add important note about 'proxy_cache_convert_head off' in Nginx configuration to prevent S3 V4 signature verification failures. Related Issue: rustfs/rustfs#717
1 parent b0b376a commit 9f59b05

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

docs/integration/nginx.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ server {
5454
proxy_set_header X-Forwarded-Proto $scheme;
5555
5656
# Disable Nginx from converting HEAD to GET
57-
# proxy_cache_convert_head off;
57+
proxy_cache_convert_head off;
5858
5959
proxy_connect_timeout 300;
6060
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
@@ -94,7 +94,7 @@ server {
9494
proxy_set_header X-Forwarded-Proto $scheme;
9595
9696
# Disable Nginx from converting HEAD to GET
97-
# proxy_cache_convert_head off;
97+
proxy_cache_convert_head off;
9898
9999
proxy_connect_timeout 300;
100100
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
@@ -115,6 +115,19 @@ server {
115115
116116
```
117117

118+
#### Important Notice
119+
120+
> [!WARNING]
121+
> **Key configuration items**
122+
>
123+
> The `proxy_cache_convert_head off` directive **must be added** to the Nginx configuration for the following reasons:
124+
>
125+
> - By default, Nginx converts HEAD requests to GET requests for caching.
126+
> - This conversion will cause S3 V4 signature verification to fail.
127+
> - The symptom is `Bucket not found` or `403 Access Denied` error when accessing the storage bucket.
128+
>
129+
> Refer to [Nginx Official Documentation](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_convert_head)
130+
118131
## 3. Multi-Machine Load Balancing
119132

120133
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 {
203216
proxy_pass http://127.0.0.1:9001;
204217
}
205218
}
206-
~~~
219+
~~~

0 commit comments

Comments
 (0)