mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Created S3 Nginx Proxy (markdown)
parent
a4a46f0151
commit
ee63d8a258
35
S3-Nginx-Proxy.md
Normal file
35
S3-Nginx-Proxy.md
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
It's a common concept to put a proxy in front of S3 that handles requests. Nginx is well suited for this and can be used to additionally handle TLS and path style (using subdomains instead of subfolders).
|
||||||
|
|
||||||
|
**Example Nginx config which convertIt's a common concept to put a proxy in front of S3 that handles requests. Nginx is well suited for this and can be used to additionally handle TLS and path style (using subdomains instead of subfolders).
|
||||||
|
|
||||||
|
### Example Nginx config
|
||||||
|
|
||||||
|
```
|
||||||
|
upstream seaweedfs { server localhost:8333 fail_timeout=0; }
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name ~^(?<subdomain>[^.]+).yourdomain.com;
|
||||||
|
|
||||||
|
ignore_invalid_headers off;
|
||||||
|
client_max_body_size 0;
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
proxy_connect_timeout 300;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
chunked_transfer_encoding off;
|
||||||
|
|
||||||
|
proxy_pass http://seaweedfs$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
ssl on;
|
||||||
|
ssl_certificate /{path_to_ssl_cert}/cert.pem;
|
||||||
|
ssl_certificate_key /{path_to_ssl_cert}/key.pem;
|
||||||
|
}
|
Loading…
Reference in a new issue