This commit is contained in:
hailin 2025-06-21 13:02:14 +08:00
parent e866915432
commit c62a17045d
1 changed files with 33 additions and 4 deletions

View File

@ -1,17 +1,17 @@
# ========= S3 API 主站域名 ========== # ========= S3 API 主站域名 ==========
upstream cloud { upstream cloud {
server 127.0.0.1:9000; # MinIO S3 API server 127.0.0.1:9000; # MinIO S3 API
keepalive 64; keepalive 64;
} }
# ========= 控制台子域名 ========== # ========= 控制台子域名 ==========
upstream admin { upstream admin {
server 127.0.0.1:9001; # MinIO 控制台 Web UI server 127.0.0.1:9001; # MinIO 控制台 Web UI
keepalive 64; keepalive 64;
} }
# ---------------------------- # ----------------------------
# ✅ S3 API 域名https://s3.szaiai.com # ✅ 控制台路径反代保留原逻辑https://s3.szaiai.com/s3
# ---------------------------- # ----------------------------
server { server {
server_name s3.szaiai.com; server_name s3.szaiai.com;
@ -45,7 +45,7 @@ server {
} }
# ---------------------------- # ----------------------------
# ✅ 控制台域名https://console.szaiai.com # ✅ 控制台 UI 域名https://console.szaiai.com
# ---------------------------- # ----------------------------
server { server {
server_name console.szaiai.com; server_name console.szaiai.com;
@ -75,3 +75,32 @@ server {
server_name console.szaiai.com; server_name console.szaiai.com;
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
} }
# ----------------------------
# ✅ 新增:干净的 API 域名,用于 mc/share/downloadhttps://api.szaiai.com
# ----------------------------
server {
server_name api.szaiai.com;
client_max_body_size 5G;
location / {
proxy_pass http://cloud/;
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;
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/api.szaiai.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.szaiai.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
listen 80;
server_name api.szaiai.com;
return 301 https://$host$request_uri;
}