Minio 配置 nginx 代理

接口

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
server {
listen 80;
listen 443 ssl http2;
server_name 域名;
ssl_certificate 证书位置;
ssl_certificate_key 证书;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers ;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
access_log 访问日志;
error_log 错误日志;

location / {
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 Host $http_host;
proxy_connect_timeout 300;
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;

proxy_pass http://127.0.0.1:9000;
}
}

页面代理

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
server {
listen 80;
listen 443 ssl http2;
server_name 域名;
ssl_certificate 证书位置;
ssl_certificate_key 证书;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers ;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
access_log 访问日志;
error_log 错误日志;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:9001;
}
}