feat: improve nginx.conf

This commit is contained in:
fantasticit 2022-04-11 22:02:03 +08:00
parent 85a79127b0
commit fb16c0a0e9
1 changed files with 19 additions and 20 deletions

View File

@ -29,30 +29,30 @@ server {
client_max_body_size 100m;
location /think {
proxy_pass http://think_server;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
location /think/wss {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Nginx-Proxy true;
proxy_cache_bypass $http_upgrade;
proxy_pass http://think_wss;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
}
location /think {
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-Nginx-Proxy true;
proxy_cache_bypass $http_upgrade;
proxy_pass http://think_server;
location /think/wss {
proxy_pass http://think_wss;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
}
}
@ -70,7 +70,6 @@ server {
ssl_certificate_key /apps/ssl/think.codingit.cn/think.codingit.cn.key;
ssl_session_timeout 5m;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;