2020-07-12 19:15:40 +02:00
|
|
|
map $remote_addr $freeswitch_addr {
|
|
|
|
"~:" [::1];
|
2020-07-21 17:22:58 +02:00
|
|
|
default 10.7.7.1;
|
2020-07-12 19:15:40 +02:00
|
|
|
}
|
|
|
|
|
2021-02-24 21:50:27 +01:00
|
|
|
upstream poolhtml5servers {
|
|
|
|
zone poolhtml5servers 32k;
|
|
|
|
least_conn;
|
2021-03-27 18:48:05 +01:00
|
|
|
server 10.7.7.200:4100 fail_timeout=10s max_fails=4 backup;
|
|
|
|
server 10.7.7.201:4101 fail_timeout=120s max_fails=1;
|
|
|
|
server 10.7.7.202:4102 fail_timeout=120s max_fails=1;
|
|
|
|
server 10.7.7.203:4103 fail_timeout=120s max_fails=1;
|
2021-12-21 14:23:59 +01:00
|
|
|
# TODO: set server list based on NUMBER_OF_FRONTEND_NODEJS_PROCESSES
|
|
|
|
# server 10.7.7.204:4104 fail_timeout=120s max_fails=1;
|
|
|
|
# server 10.7.7.205:4105 fail_timeout=120s max_fails=1;
|
|
|
|
# server 10.7.7.206:4106 fail_timeout=120s max_fails=1;
|
|
|
|
# server 10.7.7.207:4107 fail_timeout=120s max_fails=1;
|
2021-02-24 21:50:27 +01:00
|
|
|
}
|
|
|
|
|
2020-04-09 02:11:32 +02:00
|
|
|
server {
|
2021-11-27 18:22:03 +01:00
|
|
|
listen 48087 default_server;
|
|
|
|
listen [::]:48087 default_server;
|
2020-04-09 02:11:32 +02:00
|
|
|
server_name _;
|
2020-07-12 19:15:40 +02:00
|
|
|
access_log /dev/stdout;
|
2020-07-13 17:52:31 +02:00
|
|
|
absolute_redirect off;
|
2021-03-27 18:49:20 +01:00
|
|
|
root /www/;
|
2020-07-13 17:52:31 +02:00
|
|
|
|
2021-04-16 10:40:03 +02:00
|
|
|
# opt-out of google's floc tracking
|
|
|
|
# https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea
|
|
|
|
add_header Permissions-Policy "interest-cohort=()";
|
|
|
|
|
2020-04-12 16:01:57 +02:00
|
|
|
|
2020-04-09 02:11:32 +02:00
|
|
|
# Include specific rules for record and playback
|
2020-04-09 08:48:47 +02:00
|
|
|
include /etc/nginx/bbb/*.nginx;
|
2020-04-09 02:11:32 +02:00
|
|
|
|
2023-03-24 23:26:55 +01:00
|
|
|
# redirect old greenlight v2 room links
|
|
|
|
location ~ "/b/([a-z0-9\-]+)" {
|
|
|
|
return 302 /rooms/$1;
|
|
|
|
}
|
2023-03-21 12:58:28 +01:00
|
|
|
|
|
|
|
location / {
|
|
|
|
proxy_pass http://greenlight:3000;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-Ssl on;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
client_max_body_size 1000m;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /cable {
|
|
|
|
proxy_pass http://greenlight:3000;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_set_header X-Forwarded-Ssl on;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_read_timeout 6h;
|
|
|
|
proxy_send_timeout 6h;
|
|
|
|
client_body_timeout 6h;
|
|
|
|
send_timeout 6h;
|
|
|
|
}
|
2020-04-09 02:11:32 +02:00
|
|
|
}
|