mirror of https://github.com/fantasticit/think.git
feat: improve nginx.conf
This commit is contained in:
parent
85a79127b0
commit
fb16c0a0e9
35
nginx.conf
35
nginx.conf
|
@ -29,30 +29,30 @@ server {
|
||||||
|
|
||||||
client_max_body_size 100m;
|
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-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
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 {
|
location /think/wss {
|
||||||
proxy_http_version 1.1;
|
proxy_pass http://think_wss;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_read_timeout 300s;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_send_timeout 300s;
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Nginx-Proxy true;
|
|
||||||
proxy_cache_bypass $http_upgrade;
|
|
||||||
proxy_pass http://think_server;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
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_certificate_key /apps/ssl/think.codingit.cn/think.codingit.cn.key;
|
||||||
ssl_session_timeout 5m;
|
ssl_session_timeout 5m;
|
||||||
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
|
Loading…
Reference in New Issue