初始化提交
This commit is contained in:
104
nginx/test-scalelink_frontend.conf
Normal file
104
nginx/test-scalelink_frontend.conf
Normal file
@@ -0,0 +1,104 @@
|
||||
server {
|
||||
#SSL 默认访问端口号为 443
|
||||
listen 443 ssl;
|
||||
#请填写绑定证书的域名
|
||||
|
||||
#---------------- 原先的旧UI使用的域名以及证书,在旧UI完全停止启用新UI后使用以下这些 ↓ ----------
|
||||
#server_name testpartner.deeplink.media;
|
||||
#请填写证书文件的相对路径或绝对路径
|
||||
#ssl_certificate /data/tengine/conf/certificate/deeplink.media_bundle.crt;
|
||||
#请填写私钥文件的相对路径或绝对路径
|
||||
#ssl_certificate_key /data/tengine/conf/certificate/deeplink.media.key;
|
||||
#----------------- 原先的旧UI使用的域名以及证书,在旧UI完全停止启用新UI后使用以上这些 ↑ ---------
|
||||
|
||||
|
||||
#---------------- 旧UI还在使用原的域名,临时使用这个域名和证书访问新UI ------------
|
||||
server_name testpartner.flytothmoon.online;
|
||||
#请填写证书文件的相对路径或绝对路径
|
||||
ssl_certificate /data/tengine/conf/certificate/testpartner.flytothmoon.online_bundle.crt;
|
||||
#请填写私钥文件的相对路径或绝对路径
|
||||
ssl_certificate_key /data/tengine/conf/certificate/testpartner.flytothmoon.online.key;
|
||||
#---------------- 旧UI还在使用原的域名,临时使用这个域名和证书访问新UI ------------
|
||||
|
||||
|
||||
|
||||
ssl_session_timeout 5m;
|
||||
#请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
||||
#请按照以下协议配置
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
client_max_body_size 300M;
|
||||
#client_body_buffer_size 1M; # 设置最大缓冲区为 1MB
|
||||
client_body_buffer_size 10M; # 提高上传缓冲区大小
|
||||
proxy_buffer_size 16k; # 调整代理缓冲区
|
||||
proxy_buffers 4 32k; # 提供多个缓冲区
|
||||
proxy_busy_buffers_size 64k;
|
||||
|
||||
location / {
|
||||
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
|
||||
#例如,您的网站主页在 Nginx 服务器的 /etc/www 目录下,则请修改 root 后面的 html 为 /etc/www。
|
||||
|
||||
root /data/tengine/html/scalelink_frontend/dist;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
# 处理 /sse 请求
|
||||
location ~ ^/(sit|test|prod)-api/sse(/.*)?$ {
|
||||
rewrite ^/(sit|test|prod)-api/sse(/.*)?$ /sse$2 break;
|
||||
proxy_pass http://127.0.0.1:8040;
|
||||
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_redirect off;
|
||||
|
||||
# 增加 SSE 相关配置
|
||||
proxy_buffering off; # 禁用代理缓冲
|
||||
proxy_cache off; # 禁用代理缓存
|
||||
proxy_http_version 1.1; # 使用 HTTP/1.1
|
||||
proxy_set_header Connection ''; # 清除 Connection 头部
|
||||
chunked_transfer_encoding on; # 启用分块传输编码
|
||||
proxy_read_timeout 86400s; # 设置长时间的读取超时时间
|
||||
}
|
||||
|
||||
|
||||
location ^~ /prod-api {
|
||||
#client_max_body_size 100m;
|
||||
proxy_pass http://127.0.0.1:8060;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
# 处理 /test-api 请求
|
||||
location ~ ^/test-api/(?!sse/).* {
|
||||
#client_max_body_size 100m;
|
||||
proxy_pass http://127.0.0.1:8060;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#---------------- 原先的旧UI使用的域名以及证书,在旧UI完全停止启用新UI后使用以下这些 ↓ ----------
|
||||
# server {
|
||||
# listen 80;
|
||||
# #请填写绑定证书的域名
|
||||
# server_name testpartner.deeplink.media;
|
||||
# #把http的域名请求转成https
|
||||
# return 301 https://$host$request_uri;
|
||||
# }
|
||||
#----------------- 原先的旧UI使用的域名以及证书,在旧UI完全停止启用新UI后使用以上这些 ↑ ---------
|
||||
|
||||
|
||||
#---------------- 旧UI还在使用原的域名,临时使用这个域名和证书访问新UI ------------
|
||||
server {
|
||||
listen 80;
|
||||
#请填写绑定证书的域名
|
||||
server_name testpartner.flytothmoon.online;
|
||||
#把http的域名请求转成https
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
#---------------- 旧UI还在使用原的域名,临时使用这个域名和证书访问新UI ------------
|
||||
Reference in New Issue
Block a user