1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jitsi_ynh.git synced 2024-09-03 19:35:57 +02:00
jitsi_ynh/conf/nginx.conf

96 lines
2.3 KiB
Nginx Configuration File
Raw Normal View History

2020-04-10 05:21:33 +02:00
root __FINALPATH__/jitsi-meet-web;
2019-06-06 06:04:22 +02:00
2020-04-10 05:21:33 +02:00
# ssi on with javascript for multidomain variables in config.js
ssi on;
ssi_types application/x-javascript application/javascript;
2019-06-06 06:04:22 +02:00
2020-04-10 05:21:33 +02:00
index index.html index.htm;
error_page 404 /static/404.html;
location = /config.js {
2020-04-15 08:50:39 +02:00
alias /etc/__NAME__/meet/__DOMAIN__-config.js;
2015-01-14 10:55:14 +01:00
}
2020-04-10 05:21:33 +02:00
location = /external_api.js {
alias __FINALPATH__/jitsi-meet-web/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 __FINALPATH__/jitsi-meet-web/$1/$2;
2022-02-03 03:00:20 +01:00
# cache all versioned files
if ($arg_v) {
expires 1y;
}
2019-07-13 22:03:01 +02:00
}
2019-07-14 01:17:46 +02:00
# BOSH
2020-04-10 05:21:33 +02:00
location = /http-bind {
2022-02-03 03:00:20 +01:00
proxy_pass http://127.0.0.1:5280/http-bind?prefix=$prefix&$args;
2015-01-14 10:55:14 +01:00
proxy_set_header X-Forwarded-For $remote_addr;
2022-02-03 03:00:20 +01:00
proxy_set_header Host $http_host;
2015-01-14 10:55:14 +01:00
}
2019-07-14 01:17:46 +02:00
# xmpp websockets
2020-04-10 05:21:33 +02:00
location = /xmpp-websocket {
2022-02-03 03:00:20 +01:00
proxy_pass http://127.0.0.1:5280/xmpp-websocket?prefix=$prefix&$args;
2019-07-14 01:17:46 +02:00
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
2020-04-10 05:21:33 +02:00
proxy_set_header Host $http_host;
2019-07-14 01:17:46 +02:00
tcp_nodelay on;
}
2020-04-10 05:21:33 +02:00
2022-02-03 03:00:20 +01:00
# colibri (JVB) websockets for jvb1
location ~ ^/colibri-ws/default-id/(.*) {
proxy_pass http://127.0.0.1:9090/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;
}
2020-04-10 05:21:33 +02:00
location ~ ^/([^/?&:'"]+)$ {
try_files $uri @root_path;
}
location @root_path {
rewrite ^/(.*)$ / break;
}
location ~ ^/([^/?&:'"]+)/config.js$
{
set $subdomain "$1.";
set $subdir "$1/";
2020-04-15 08:50:39 +02:00
alias /etc/__NAME__/meet/__DOMAIN__-config.js;
2020-04-10 05:21:33 +02:00
}
# 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;
}
2022-02-03 03:00:20 +01: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;
}