2015-03-05 15:52:05 +00:00
|
|
|
server_names_hash_bucket_size 64;
|
|
|
|
|
2021-01-27 19:07:02 +00:00
|
|
|
types {
|
|
|
|
# nginx's default mime.types doesn't include a mapping for wasm
|
|
|
|
application/wasm wasm;
|
|
|
|
}
|
2022-03-19 21:13:59 +00:00
|
|
|
upstream prosody {
|
|
|
|
zone upstreams 64K;
|
|
|
|
server 127.0.0.1:5280;
|
|
|
|
keepalive 2;
|
|
|
|
}
|
|
|
|
upstream jvb1 {
|
|
|
|
zone upstreams 64K;
|
|
|
|
server 127.0.0.1:9090;
|
|
|
|
keepalive 2;
|
|
|
|
}
|
2014-07-01 13:18:30 +00:00
|
|
|
server {
|
|
|
|
listen 80;
|
2020-03-17 22:31:56 +00:00
|
|
|
listen [::]:80;
|
2014-07-01 13:18:30 +00:00
|
|
|
server_name jitsi-meet.example.com;
|
2020-01-09 16:51:27 +00:00
|
|
|
|
|
|
|
location ^~ /.well-known/acme-challenge/ {
|
2021-01-04 14:22:40 +00:00
|
|
|
default_type "text/plain";
|
|
|
|
root /usr/share/jitsi-meet;
|
2020-01-09 16:51:27 +00:00
|
|
|
}
|
|
|
|
location = /.well-known/acme-challenge/ {
|
2021-01-04 14:22:40 +00:00
|
|
|
return 404;
|
2020-01-09 16:51:27 +00:00
|
|
|
}
|
|
|
|
location / {
|
2021-01-04 14:22:40 +00:00
|
|
|
return 301 https://$host$request_uri;
|
2020-01-09 16:51:27 +00:00
|
|
|
}
|
2014-07-01 13:18:30 +00:00
|
|
|
}
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
2020-03-17 22:31:56 +00:00
|
|
|
listen [::]:443 ssl;
|
2014-07-01 13:18:30 +00:00
|
|
|
server_name jitsi-meet.example.com;
|
|
|
|
|
2021-01-04 14:22:40 +00:00
|
|
|
# Mozilla Guideline v5.4, nginx 1.17.7, OpenSSL 1.1.1d, intermediate configuration
|
2020-05-20 16:56:05 +00:00
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
|
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
|
|
|
ssl_prefer_server_ciphers off;
|
2015-10-26 17:47:34 +00:00
|
|
|
|
2020-05-20 16:56:05 +00:00
|
|
|
ssl_session_timeout 1d;
|
|
|
|
ssl_session_cache shared:SSL:10m; # about 40000 sessions
|
|
|
|
ssl_session_tickets off;
|
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
2021-05-13 18:07:44 +00:00
|
|
|
set $prefix "";
|
2015-10-26 17:47:34 +00:00
|
|
|
|
2016-11-21 21:16:37 +00:00
|
|
|
ssl_certificate /etc/jitsi/meet/jitsi-meet.example.com.crt;
|
|
|
|
ssl_certificate_key /etc/jitsi/meet/jitsi-meet.example.com.key;
|
2014-07-01 13:18:30 +00:00
|
|
|
|
2014-07-01 13:25:30 +00:00
|
|
|
root /usr/share/jitsi-meet;
|
2019-12-04 14:59:28 +00:00
|
|
|
|
|
|
|
# ssi on with javascript for multidomain variables in config.js
|
2019-10-14 15:17:54 +00:00
|
|
|
ssi on;
|
2019-12-04 14:59:28 +00:00
|
|
|
ssi_types application/x-javascript application/javascript;
|
|
|
|
|
2014-07-01 13:18:30 +00:00
|
|
|
index index.html index.htm;
|
2017-03-20 21:05:11 +00:00
|
|
|
error_page 404 /static/404.html;
|
2014-07-01 13:18:30 +00:00
|
|
|
|
2020-04-07 14:42:27 +00:00
|
|
|
gzip on;
|
2020-08-14 08:29:25 +00:00
|
|
|
gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
|
2020-04-07 14:42:27 +00:00
|
|
|
gzip_vary on;
|
2020-08-14 08:29:25 +00:00
|
|
|
gzip_proxied no-cache no-store private expired auth;
|
|
|
|
gzip_min_length 512;
|
2020-04-07 14:42:27 +00:00
|
|
|
|
2019-10-14 15:17:54 +00:00
|
|
|
location = /config.js {
|
2014-10-22 15:22:18 +00:00
|
|
|
alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
|
|
|
|
}
|
|
|
|
|
2019-10-14 15:17:54 +00:00
|
|
|
location = /external_api.js {
|
2019-04-23 16:36:33 +00:00
|
|
|
alias /usr/share/jitsi-meet/libs/external_api.min.js;
|
|
|
|
}
|
|
|
|
|
2021-01-04 14:22:40 +00:00
|
|
|
# ensure all static content can always be found first
|
2019-10-14 15:17:54 +00:00
|
|
|
location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
|
|
|
|
{
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
alias /usr/share/jitsi-meet/$1/$2;
|
2020-08-14 08:29:25 +00:00
|
|
|
|
|
|
|
# cache all versioned files
|
|
|
|
if ($arg_v) {
|
2021-01-04 14:22:40 +00:00
|
|
|
expires 1y;
|
2020-08-14 08:29:25 +00:00
|
|
|
}
|
2014-09-30 13:05:28 +00:00
|
|
|
}
|
|
|
|
|
2014-07-01 13:18:30 +00:00
|
|
|
# BOSH
|
2019-10-14 15:17:54 +00:00
|
|
|
location = /http-bind {
|
2022-03-19 21:13:59 +00:00
|
|
|
proxy_pass http://prosody/http-bind?prefix=$prefix&$args;
|
|
|
|
proxy_http_version 1.1;
|
2014-07-01 13:18:30 +00:00
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $http_host;
|
2022-03-19 21:13:59 +00:00
|
|
|
proxy_set_header Connection "";
|
2014-07-01 13:18:30 +00:00
|
|
|
}
|
2019-10-14 15:17:54 +00:00
|
|
|
|
2020-01-24 17:41:30 +00:00
|
|
|
# xmpp websockets
|
|
|
|
location = /xmpp-websocket {
|
2022-03-19 21:13:59 +00:00
|
|
|
proxy_pass http://prosody/xmpp-websocket?prefix=$prefix&$args;
|
2020-01-24 17:41:30 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
tcp_nodelay on;
|
|
|
|
}
|
|
|
|
|
2020-09-25 18:15:58 +00:00
|
|
|
# colibri (JVB) websockets for jvb1
|
|
|
|
location ~ ^/colibri-ws/default-id/(.*) {
|
2022-03-19 21:13:59 +00:00
|
|
|
proxy_pass http://jvb1/colibri-ws/default-id/$1$is_args$args;
|
2021-01-04 14:22:40 +00:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
tcp_nodelay on;
|
2020-09-25 18:15:58 +00:00
|
|
|
}
|
|
|
|
|
2021-02-04 23:04:36 +00:00
|
|
|
# load test minimal client, uncomment when used
|
|
|
|
#location ~ ^/_load-test/([^/?&:'"]+)$ {
|
|
|
|
# rewrite ^/_load-test/(.*)$ /load-test/index.html break;
|
|
|
|
#}
|
|
|
|
#location ~ ^/_load-test/libs/(.*)$ {
|
|
|
|
# add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
# alias /usr/share/jitsi-meet/load-test/libs/$1;
|
|
|
|
#}
|
|
|
|
|
2019-11-15 13:27:49 +00:00
|
|
|
location ~ ^/([^/?&:'"]+)$ {
|
2019-10-14 15:17:54 +00:00
|
|
|
try_files $uri @root_path;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @root_path {
|
|
|
|
rewrite ^/(.*)$ / break;
|
|
|
|
}
|
2019-12-04 14:59:28 +00:00
|
|
|
|
|
|
|
location ~ ^/([^/?&:'"]+)/config.js$
|
|
|
|
{
|
2021-01-04 14:22:40 +00:00
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
2019-12-04 14:59:28 +00:00
|
|
|
|
2021-01-04 14:22:40 +00:00
|
|
|
alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
|
2019-12-04 14:59:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# BOSH for subdomains
|
|
|
|
location ~ ^/([^/?&:'"]+)/http-bind {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
set $prefix "$1";
|
|
|
|
|
|
|
|
rewrite ^/(.*)$ /http-bind;
|
|
|
|
}
|
2020-01-24 17:41:30 +00:00
|
|
|
|
|
|
|
# websockets for subdomains
|
|
|
|
location ~ ^/([^/?&:'"]+)/xmpp-websocket {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
set $prefix "$1";
|
|
|
|
|
|
|
|
rewrite ^/(.*)$ /xmpp-websocket;
|
|
|
|
}
|
2021-05-13 18:07:44 +00:00
|
|
|
|
|
|
|
# Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
|
|
|
|
location ~ ^/([^/?&:'"]+)/(.*)$ {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
|
|
|
|
}
|
2014-07-01 13:18:30 +00:00
|
|
|
}
|