-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
53 lines (42 loc) · 1.27 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#user nobody;
worker_processes 1;
daemon off;
error_log /dev/stdout info;
pid nginx.pid;
events {
worker_connections 1024;
}
http {
access_log /dev/stdout;
push_stream_shared_memory_size 32M;
server {
listen 127.0.0.1:9564;
server_name localhost;
location /channels-stats {
# activate channels statistics mode for this location
push_stream_channels_statistics;
# query string based channel id
push_stream_channels_path $arg_id;
}
location /pub {
# activate publisher (admin) mode for this location
push_stream_publisher admin;
# query string based channel id
push_stream_channels_path $arg_id;
}
location /events {
# events are published here
push_stream_subscriber;
push_stream_channels_path events;
}
location ~ /sub/(.*) {
# activate subscriber (streaming) mode for this location
push_stream_subscriber;
# positional channel path
push_stream_channels_path $1;
}
location / {
proxy_pass http://localhost:8000;
}
}
}