41 lines
1.4 KiB
Nginx Configuration File
41 lines
1.4 KiB
Nginx Configuration File
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
worker_processes 2;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
postpone_output 1; # only postpone a single byte, default 1460 bytes
|
|
access_log /var/log/nginx-http_access.log;
|
|
|
|
push_stream_shared_memory_size 100m;
|
|
push_stream_max_channel_id_length 200;
|
|
# max messages to store in memory
|
|
push_stream_max_messages_stored_per_channel 20;
|
|
# message ttl
|
|
push_stream_message_ttl 5m;
|
|
# ping frequency
|
|
push_stream_ping_message_interval 30s;
|
|
# connection ttl to enable recycle
|
|
push_stream_subscriber_connection_ttl 15m;
|
|
# connection ttl for long polling
|
|
push_stream_longpolling_connection_ttl 30s;
|
|
push_stream_timeout_with_body off;
|
|
|
|
# wildcard
|
|
push_stream_wildcard_channel_prefix "broad_";
|
|
push_stream_wildcard_channel_max_qtd 3;
|
|
|
|
push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":\"~text~\", \"tag\":\"~tag~\", \"time\":\"~time~\", \"eventid\":\"~event-id~\"}";
|
|
|
|
# subscriber may create channels on demand or only authorized (publisher) may do it?
|
|
push_stream_authorized_channels_only off;
|
|
|
|
push_stream_allowed_origins "*";
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
}
|