plugai_updsrv/nginx/s3.conf

76 lines
2.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ========= 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;
client_max_body_size 100M;
location / {
return 404;
}
location /s3/ {
proxy_redirect off;
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/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;
}