40 lines
827 B
Nginx Configuration File
40 lines
827 B
Nginx Configuration File
|
|
server {
|
|
server_name {{ common_name }};
|
|
listen 80 default_server;
|
|
error_page 500 502 503 504 /50x.html;
|
|
|
|
root {{static_path}};
|
|
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1/api/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_connect_timeout 600;
|
|
proxy_send_timeout 600;
|
|
proxy_read_timeout 600;
|
|
send_timeout 600;
|
|
}
|
|
|
|
{% if not push_server %}
|
|
location /pub {
|
|
allow 127.0.0.1;
|
|
nchan_publisher http;
|
|
nchan_store_messages off;
|
|
nchan_channel_id $arg_id;
|
|
}
|
|
|
|
location ~ "^/lp/(.*)" {
|
|
nchan_subscriber longpoll;
|
|
nchan_channel_id $1;
|
|
}
|
|
|
|
location ~ "^/ev/(.*)" {
|
|
nchan_subscriber eventsource;
|
|
nchan_channel_id $1;
|
|
}
|
|
{% endif %}
|
|
|
|
}
|
|
|