148 lines
3.4 KiB
Plaintext
148 lines
3.4 KiB
Plaintext
#server_names_hash_bucket_size 64;
|
|
|
|
types {
|
|
# nginx's default mime.types doesn't include a mapping for wasm
|
|
application/wasm wasm;
|
|
}
|
|
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;
|
|
}
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name jitsi.vern.cc;
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name jitsi.vern.cc;
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
|
set $prefix "";
|
|
|
|
include snippets/lets-encrypt.conf;
|
|
root /usr/share/jitsi-meet;
|
|
|
|
# ssi on with javascript for multidomain variables in config.js
|
|
ssi on;
|
|
ssi_types application/x-javascript application/javascript;
|
|
|
|
index index.html index.htm;
|
|
error_page 404 /static/404.html;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
|
|
gzip_vary on;
|
|
gzip_proxied no-cache no-store private expired auth;
|
|
gzip_min_length 512;
|
|
|
|
location = /config.js {
|
|
alias /etc/jitsi/meet/jitsi.vern.cc-config.js;
|
|
}
|
|
|
|
location = /external_api.js {
|
|
alias /usr/share/jitsi-meet/libs/external_api.min.js;
|
|
}
|
|
|
|
# ensure all static content can always be found first
|
|
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;
|
|
|
|
# cache all versioned files
|
|
if ($arg_v) {
|
|
expires 1y;
|
|
}
|
|
}
|
|
|
|
# BOSH
|
|
location = /http-bind {
|
|
proxy_pass http://prosody/http-bind?prefix=$prefix&$args;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Connection "";
|
|
}
|
|
|
|
# xmpp websockets
|
|
location = /xmpp-websocket {
|
|
proxy_pass http://prosody/xmpp-websocket?prefix=$prefix&$args;
|
|
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;
|
|
}
|
|
|
|
# colibri (JVB) websockets for jvb1
|
|
location ~ ^/colibri-ws/default-id/(.*) {
|
|
proxy_pass http://jvb1/colibri-ws/default-id/$1$is_args$args;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
tcp_nodelay on;
|
|
}
|
|
|
|
# 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;
|
|
#}
|
|
|
|
location ~ ^/([^/?&:'"]+)$ {
|
|
try_files $uri @root_path;
|
|
}
|
|
|
|
location @root_path {
|
|
rewrite ^/(.*)$ / break;
|
|
}
|
|
|
|
location ~ ^/([^/?&:'"]+)/config.js$
|
|
{
|
|
set $subdomain "$1.";
|
|
set $subdir "$1/";
|
|
|
|
alias /etc/jitsi/meet/jitsi.vern.cc-config.js;
|
|
}
|
|
|
|
# BOSH for subdomains
|
|
location ~ ^/([^/?&:'"]+)/http-bind {
|
|
set $subdomain "$1.";
|
|
set $subdir "$1/";
|
|
set $prefix "$1";
|
|
|
|
rewrite ^/(.*)$ /http-bind;
|
|
}
|
|
|
|
# websockets for subdomains
|
|
location ~ ^/([^/?&:'"]+)/xmpp-websocket {
|
|
set $subdomain "$1.";
|
|
set $subdir "$1/";
|
|
set $prefix "$1";
|
|
|
|
rewrite ^/(.*)$ /xmpp-websocket;
|
|
}
|
|
|
|
# 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;
|
|
}
|
|
}
|