Skip to content

Commit 52ebbaa

Browse files
author
Zhe Ye
committed
add nginx.conf
1 parent 476e166 commit 52ebbaa

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

nginx.conf

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
user nginx;
3+
worker_processes 1;
4+
5+
error_log /var/log/nginx/error.log warn;
6+
pid /var/run/nginx.pid;
7+
8+
9+
events {
10+
worker_connections 1024;
11+
}
12+
13+
14+
http {
15+
map $http_upgrade $connection_upgrade {
16+
default upgrade;
17+
'' close;
18+
}
19+
20+
upstream websocket {
21+
server 127.0.0.1:8000;
22+
server 127.0.0.1:8001;
23+
server 127.0.0.1:8002;
24+
server 127.0.0.1:8003;
25+
server 127.0.0.1:8004;
26+
server 127.0.0.1:8005;
27+
server 127.0.0.1:8006;
28+
server 127.0.0.1:8007;
29+
server 127.0.0.1:8008;
30+
server 127.0.0.1:8009;
31+
}
32+
33+
server {
34+
listen 9000;
35+
location / {
36+
proxy_pass http://websocket;
37+
proxy_http_version 1.1;
38+
proxy_read_timeout 500ms;
39+
proxy_set_header Upgrade $http_upgrade;
40+
proxy_set_header Connection $connection_upgrade;
41+
}
42+
}
43+
}

0 commit comments

Comments
 (0)