Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server_names_hash_bucket_size 64;
- server {
- server_name jitsi.domain.de ;
- root /usr/share/jitsi-meet;
- index index.html index.htm;
- error_page 404 /static/404.html;
- # ssi on with javascript for multidomain variables in config.js
- ssi on;
- ssi_types application/x-javascript application/javascript;
- gzip on;
- gzip_types text/plain text/css application/javascript application/json;
- gzip_vary on;
- brotli on;
- brotli_types text/plain text/css application/javascript application/json;
- location = /config.js {
- alias /etc/jitsi/meet/jitsi.domain.de-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;
- }
- # BOSH, Bidirectional-streams Over Synchronous HTTP
- # https://en.wikipedia.org/wiki/BOSH_(protocol)
- location = /http-bind {
- proxy_pass http://localhost:5280/http-bind;
- proxy_set_header X-Forwarded-For $remote_addr;
- proxy_set_header Host $http_host;
- }
- # xmpp websockets
- location = /xmpp-websocket {
- proxy_pass http://localhost:5280/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 $host;
- tcp_nodelay on;
- }
- 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-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;
- }
- # websockets for subdomains
- location ~ ^/([^/?&:'"]+)/xmpp-websocket {
- set $subdomain "$1.";
- set $subdir "$1/";
- set $prefix "$1";
- rewrite ^/(.*)$ /xmpp-websocket;
- }
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
- ssl_certificate /etc/ssl/certs/jitsi.domain.de.fullchain.pem;
- ssl_certificate_key /etc/ssl/private/jitsi.domain.de.private.pem;
- }
- server {
- listen 80;
- listen [::]:80;
- server_name jitsi.domain.de;
- location / {
- return 301 https://$host$request_uri;
- }
- }
Add Comment
Please, Sign In to add comment