chore: update env variable
This commit is contained in:
+12
-8
@@ -1,13 +1,15 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# NOTE: this file is mounted into the nginx container as a TEMPLATE.
|
||||
# scripts/nginx-entrypoint.sh (mounted as /docker-entrypoint.sh) substitutes
|
||||
# the single ${RUSTFS_ENDPOINT} placeholder at container start. The rendered
|
||||
# output is written to /etc/nginx/conf.d/default.conf and execs nginx.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
upstream rustfs_backend {
|
||||
server 8.153.151.51:9000;
|
||||
keepalive 64;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
@@ -16,6 +18,9 @@ server {
|
||||
# 指定 Docker 内置 DNS 解析器,并设置 30 秒缓存
|
||||
resolver 127.0.0.11 valid=30s ipv6=off;
|
||||
|
||||
# RustFS upstream — full URL passed through to proxy_pass below.
|
||||
set $rustfs_backend "${RUSTFS_ENDPOINT}";
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html; # 前端静态文件存放在容器中的路径
|
||||
index index.html index.htm;
|
||||
@@ -48,9 +53,8 @@ server {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# 转发至 RustFS
|
||||
# 注意:如果 RustFS 内部接口也是 /storage/...,请把末尾的 / 去掉
|
||||
proxy_pass http://rustfs_backend/;
|
||||
# 转发至 RustFS($rustfs_endpoint 来自 set 指令;尾斜杠保留 location /storage/ 前缀剥离语义)
|
||||
proxy_pass $rustfs_backend/;
|
||||
|
||||
# HTTP/1.1 长连接支持
|
||||
proxy_http_version 1.1;
|
||||
|
||||
Reference in New Issue
Block a user