nginx-sid/debian/modules/nchan/dev/dev.conf
2016-08-31 16:20:00 +03:00

63 lines
1.7 KiB
Bash

#!/bin/sh #good enough highlighting
worker_processes 16;
worker_rlimit_nofile 150000;
#error_log /dev/stderr debug;
error_log /dev/stderr notice;
#error_log err.log notice;
pid /tmp/nchan-test-nginx.pid;
daemon off;
events {
worker_connections 50000;
}
http {
#include mime.types;
default_type application/octet-stream;
nchan_max_reserved_memory 1024M;
access_log off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30s;
types_hash_max_size 2048;
client_max_body_size 10M;
server_tokens off;
gzip on;
server {
listen 127.0.0.1:8083;
location ~ /action/pub/(\w+)$ {
nchan_publisher;
nchan_channel_id $1;
nchan_message_timeout 5s;
nchan_message_buffer_length 10;
}
}
server {
listen 127.0.0.1:8082;
location /action/subauth {
proxy_pass http://127.0.0.1:8053/subauth;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Subscriber-Type $nchan_subscriber_type;
proxy_set_header X-Prev-Message-Id $nchan_prev_message_id;
proxy_set_header X-Channel-Id $nchan_channel_id;
proxy_set_header X-Original-URI $request_uri;
proxy_set_header X-Forwarded-For $remote_addr;
}
location ~ /action/sub/(\w+)$ {
nchan_subscriber;
nchan_channel_id $1;
nchan_authorize_request /action/subauth;
client_body_timeout 65;
keepalive_timeout 65;
send_timeout 60;
}
}
}