54 lines
1.9 KiB
Nginx Configuration File
54 lines
1.9 KiB
Nginx Configuration File
worker_processes auto;
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
http {
|
|
resolver 127.0.0.11 valid=10s ipv6=off;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
return 301 http://$host:9001$request_uri;
|
|
}
|
|
# ── RustFS Console ──────────────────────────────────────
|
|
server {
|
|
listen 9001;
|
|
server_name _;
|
|
access_log /var/log/nginx/rustfs_access.log;
|
|
error_log /var/log/nginx/rustfs_error.log;
|
|
location / {
|
|
set $upstream http://rustfs:9001;
|
|
proxy_pass $upstream;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $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 Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 300s;
|
|
client_max_body_size 500m;
|
|
}
|
|
}
|
|
|
|
# ── RustFS S3 API ───────────────────────────────────────
|
|
server {
|
|
listen 9000;
|
|
server_name _;
|
|
access_log /var/log/nginx/rustfs_s3_access.log;
|
|
error_log /var/log/nginx/rustfs_s3_error.log;
|
|
location / {
|
|
set $upstream http://rustfs:9000;
|
|
proxy_pass $upstream;
|
|
proxy_http_version 1.1;
|
|
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_cache_convert_head off;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_read_timeout 300s;
|
|
client_max_body_size 2g;
|
|
}
|
|
}
|
|
}
|