mirror of https://github.com/fantasticit/think.git
70 lines
1.5 KiB
Plaintext
70 lines
1.5 KiB
Plaintext
upstream think_client {
|
|
server 127.0.0.1:5001;
|
|
keepalive 64;
|
|
}
|
|
|
|
upstream think_server {
|
|
server 127.0.0.1:5002;
|
|
keepalive 64;
|
|
}
|
|
|
|
upstream think_wss {
|
|
server 127.0.0.1:5003;
|
|
keepalive 64;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name dev.api.codingit.cn;
|
|
|
|
client_max_body_size 100m;
|
|
|
|
location /api {
|
|
proxy_pass http://think_server;
|
|
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';
|
|
}
|
|
|
|
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';
|
|
}
|
|
|
|
location /static/ {
|
|
proxy_pass http://think_server;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name dev.think.codingit.cn;
|
|
|
|
location / {
|
|
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_client;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|