test
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# CORS:chat-api(:10008)与 openim(:10001/:10002)已在应用内通过 openimsdk/tools/mw.CorsHandler
|
||||
# 返回 Access-Control-Allow-Origin: *。若在此再用 add_header 追加 $http_origin,浏览器会收到
|
||||
# 「*, http://IP:5173」两个值并报错。故本配置不在 Nginx 层添加 CORS,预检 OPTIONS 也交给上游处理。
|
||||
# 「*, http://IP」两个值并报错。故本配置不在 Nginx 层添加 CORS,预检 OPTIONS 也交给上游处理。
|
||||
#
|
||||
# 推荐外部访问入口:https://pc-jack.imharry.work/
|
||||
# 本 Nginx 仅监听 HTTP :80;HTTPS 由外层 LB/CDN/网关终止后转发到本机 :80。
|
||||
@@ -110,20 +110,10 @@ server {
|
||||
return 200 "ok\n";
|
||||
}
|
||||
|
||||
# PC Vite dev:web server.
|
||||
# PC 静态站点(dist).
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:5173;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $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;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
root /app/pc/dist;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,3 +208,27 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name down-jack.imharry.work;
|
||||
|
||||
root /app/build-down/dist;
|
||||
index index.html;
|
||||
|
||||
access_log /var/log/nginx/openim-build-down-access.log openim_pc_gateway;
|
||||
error_log /var/log/nginx/openim-build-down-error.log warn;
|
||||
|
||||
client_max_body_size 100m;
|
||||
|
||||
location = /nginx-health {
|
||||
access_log off;
|
||||
default_type text/plain;
|
||||
return 200 "ok\n";
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user