2015-03-05 15:52:05 +00:00
|
|
|
server_names_hash_bucket_size 64;
|
|
|
|
|
2014-07-01 13:18:30 +00:00
|
|
|
server {
|
|
|
|
listen 80;
|
|
|
|
server_name jitsi-meet.example.com;
|
2020-01-09 16:51:27 +00:00
|
|
|
|
|
|
|
location ^~ /.well-known/acme-challenge/ {
|
|
|
|
default_type "text/plain";
|
|
|
|
root /usr/share/jitsi-meet;
|
|
|
|
}
|
|
|
|
location = /.well-known/acme-challenge/ {
|
|
|
|
return 404;
|
|
|
|
}
|
|
|
|
location / {
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
2014-07-01 13:18:30 +00:00
|
|
|
}
|
|
|
|
server {
|
|
|
|
listen 443 ssl;
|
|
|
|
server_name jitsi-meet.example.com;
|
|
|
|
|
2015-10-26 17:47:34 +00:00
|
|
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
|
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA256:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EDH+aRSA+AESGCM:EDH+aRSA+SHA256:EDH+aRSA:EECDH:!aNULL:!eNULL:!MEDIUM:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED";
|
|
|
|
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000";
|
|
|
|
|
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
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-10-14 15:17:54 +00:00
|
|
|
#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;
|
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 {
|
2014-07-01 13:18:30 +00:00
|
|
|
proxy_pass http://localhost:5280/http-bind;
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
}
|
2019-10-14 15:17:54 +00:00
|
|
|
|
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$
|
|
|
|
{
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
|
|
|
|
alias /etc/jitsi/meet/jitsi-meet.example.com-config.js;
|
|
|
|
}
|
|
|
|
|
|
|
|
#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;
|
|
|
|
}
|
|
|
|
|
|
|
|
# BOSH for subdomains
|
|
|
|
location ~ ^/([^/?&:'"]+)/http-bind {
|
|
|
|
set $subdomain "$1.";
|
|
|
|
set $subdir "$1/";
|
|
|
|
set $prefix "$1";
|
|
|
|
|
|
|
|
rewrite ^/(.*)$ /http-bind;
|
|
|
|
}
|
2014-07-01 13:18:30 +00:00
|
|
|
}
|