This commit is contained in:
parent
0081a02567
commit
beb45ab6a1
|
|
@ -1,24 +1,27 @@
|
|||
# ========= S3 API 主站域名 ==========
|
||||
upstream cloud {
|
||||
server 127.0.0.1:9000; # MinIO S3 API
|
||||
keepalive 64;
|
||||
}
|
||||
|
||||
# ========= 控制台子域名 ==========
|
||||
upstream admin {
|
||||
server 127.0.0.1:9001; # MinIO 控制台 Web UI
|
||||
keepalive 64;
|
||||
}
|
||||
|
||||
# ----------------------------
|
||||
# ✅ S3 API 域名:https://s3.szaiai.com
|
||||
# ----------------------------
|
||||
server {
|
||||
server_name s3.szaiai.com;
|
||||
server_name s3.szaiai.com;
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
# 默认拒绝所有未匹配路径
|
||||
location / {
|
||||
return 404;
|
||||
}
|
||||
|
||||
# MinIO S3 API:程序访问 S3 时使用这个路径
|
||||
location /s3/ {
|
||||
proxy_redirect off;
|
||||
proxy_pass http://cloud/;
|
||||
|
|
@ -28,13 +31,45 @@ server {
|
|||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# MinIO 控制台 Web UI
|
||||
location /console/ {
|
||||
proxy_redirect off;
|
||||
listen 443 ssl;
|
||||
ssl_certificate /etc/letsencrypt/live/s3.szaiai.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/s3.szaiai.com/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name s3.szaiai.com;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# ----------------------------
|
||||
# ✅ 控制台子域名:https://console.szaiai.com
|
||||
# ----------------------------
|
||||
server {
|
||||
server_name console.szaiai.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://admin/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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/console.szaiai.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/console.szaiai.com/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name console.szaiai.com;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue