forked from slact/nchan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
49 lines (44 loc) · 1.03 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
#
# This is a (complete) example configuarion for testing this module.
#
# Example:
#
# $ mkdir -p logs
# $ touch logs/access.log logs/error.log
# $ nginx -c nginx.conf -p `pwd`/
#
# Note that nginx will stay in foreground (daemon set to off in this conf)
#
worker_processes 1;
daemon off;
error_log nginx.log debug;
events {
worker_connections 256;
}
http {
default_type application/octet-stream;
sendfile on;
#maximum amount of memory the push module is allowed to use for buffering and stuff
push_buffer_size 12M; #default is 3M
push_queue_messages off;
#sender
server {
listen localhost:8089;
location / {
default_type text/plain;
set $push_id $arg_channel; #/?channel=xyz or somesuch
push_sender;
push_message_timeout 2h; #buffered messages expire after 2 hours
}
}
#receiver
server {
listen 8088;
location / {
default_type text/plain;
set $push_id $arg_channel; #/?channel=xyz or somesuch
push_listener;
push_listener_concurrency broadcast; #default is "unique"
}
}
}