Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ server {

nchan_channel_group_accounting on;

# /sub/hogehoge?player_num=4 の形式で使う
location = /sub/(\w+) {
# /sub?channel_id=hogehoge&player_num=4 の形式で使う
location = /sub {
nchan_subscriber;
nchan_channel_group $1;
nchan_channel_id $1;
nchan_channel_group $arg_channel_id;
nchan_channel_id $arg_channel_id;
nchan_group_max_subscribers $arg_player_num;
nchan_redis_pass my_redis_server;
}

# /pub/hogehoge の形式で使う
location = /pub/(\w+)$ {
# /pub?channel_id=hogehoge の形式で使う
location = /pub {
nchan_publisher;
nchan_channel_group $1;
nchan_channel_id $1;
nchan_channel_group $arg_channel_id;
nchan_channel_id $arg_channel_id;
nchan_redis_pass my_redis_server;
}

# /group/hogehoge の形式で使う
location = /group/(\w+)$ {
nchan_channel_group $1;
# /group?channel_id=hogehoge の形式で使う
location = /group {
nchan_channel_group $arg_channel_id;
nchan_group_location;
nchan_group_max_channels 1;
nchan_redis_pass my_redis_server;
Expand Down