1 daemon off; # run in the foreground so supervisord can look after it
4 pid $${directory:run}/nginx.pid;
7 worker_connections 768;
11 error_log $${nginx-configuration:error_log};
23 types_hash_max_size 2048;
26 # server_names_hash_bucket_size 64;
27 # server_name_in_redirect off;
29 default_type application/octet-stream;
30 include ${nginx-push-stream-output:mime};
36 access_log $${nginx-configuration:access_log};
37 error_log $${nginx-configuration:error_log};
50 gzip_http_version 1.1;
51 gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
53 # Push stream Settings
55 push_stream_shared_memory_size 32m;
58 listen [$${nginx-configuration:ip}]:$${nginx-configuration:port};
59 listen $${nginx-configuration:local_ip}:$${nginx-configuration:port};
61 fastcgi_temp_path $${directory:varnginx} 1 2;
62 uwsgi_temp_path $${directory:varnginx} 1 2;
63 scgi_temp_path $${directory:varnginx} 1 2;
65 client_body_temp_path $${directory:varnginx} 1 2;
66 proxy_temp_path $${directory:varnginx} 1 2;
68 ## Serve an error 204 (No Content) for favicon.ico
69 location = /favicon.ico {
74 push_stream_publisher;
76 push_stream_channels_path $arg_id;
77 # store messages in memory
78 push_stream_store_messages $${nginx-configuration:publisher_push_stream_store_messages};
81 # client_max_body_size MUST be equal to client_body_buffer_size or
83 client_max_body_size $${nginx-configuration:publisher_client_max_body_size};
84 client_body_buffer_size $${nginx-configuration:publisher_client_body_buffer_size};
88 location ~ /sub/(.*) {
89 # activate subscriber mode for this location
90 add_header "Access-Control-Allow-Origin" $${nginx-configuration:subscriber_allow_origin};
91 add_header 'Access-Control-Allow-Credentials' $${nginx-configuration:subscriber_allow_credential};
92 add_header 'Access-Control-Allow-Methods' $${nginx-configuration:subscriber_allow_methods};
93 add_header 'Access-Control-Allow-Headers' $${nginx-configuration:subscriber_allow_headers};
95 push_stream_subscriber eventsource;
96 # positional channel path
97 push_stream_channels_path $1;
100 default_type "text/event-stream; charset=utf-8";
104 root $${directory:www};