-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
50 lines (42 loc) · 1.08 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
user www-data;
pid /var/run/nginx.pid;
worker_processes 5;
events {
worker_connections 1024;
}
http {
push_max_reserved_memory 12M;
server {
listen 80;
server_name server.http.com;
push_store_messages on;
push_min_message_buffer_length 0;
push_max_message_buffer_length 1;
push_delete_oldest_received_message on;
proxy_read_timeout 3600;
proxy_connect_timeout 3600;
location /listen
{
proxy_method GET;
proxy_pass http://localhost/activity?channel=alarm;
}
location /turn/alarm/on
{
proxy_method POST;
proxy_set_body 'on1';
proxy_pass http://localhost/publish?channel=alarm;
}
location /publish {
allow 127.0.0.1;
deny all;
set $push_channel_id $arg_channel;
push_publisher;
}
location /activity {
allow 127.0.0.1;
deny all;
push_subscriber;
set $push_channel_id $arg_channel;
}
}
}