2021-02-01 08:50:38 +00:00
|
|
|
# some doc: https://www.nginx.com/resources/wiki/start/topics/examples/full/
|
|
|
|
error_log /dev/stderr;
|
|
|
|
|
|
|
|
events {}
|
|
|
|
|
|
|
|
http {
|
|
|
|
access_log /dev/stdout;
|
|
|
|
server_names_hash_bucket_size 64;
|
|
|
|
|
2021-02-01 17:19:43 +00:00
|
|
|
# inspired by https://raw.githubusercontent.com/jitsi/docker-jitsi-meet/master/web/rootfs/defaults/meet.conf
|
2021-02-01 08:50:38 +00:00
|
|
|
server {
|
|
|
|
listen 0.0.0.0:{{ env "NOMAD_PORT_https_port" }} ssl http2 default_server;
|
|
|
|
listen [::]:{{ env "NOMAD_PORT_https_port" }} ssl http2 default_server;
|
2021-02-01 17:19:43 +00:00
|
|
|
client_max_body_size 0;
|
2021-02-01 08:50:38 +00:00
|
|
|
server_name _;
|
2021-02-01 17:19:43 +00:00
|
|
|
|
|
|
|
# ssi on with javascript for multidomain variables in config.js
|
|
|
|
ssi on;
|
|
|
|
ssi_types application/x-javascript application/javascript;
|
|
|
|
|
2021-02-01 08:50:38 +00:00
|
|
|
ssl_certificate /etc/nginx/jitsi.crt;
|
|
|
|
ssl_certificate_key /etc/nginx/jitsi.key;
|
|
|
|
root /srv/jitsi-meet;
|
|
|
|
index index.html;
|
2021-02-01 17:19:43 +00:00
|
|
|
error_page 404 /static/404.html;
|
|
|
|
|
|
|
|
location = /config.js {
|
|
|
|
alias /srv/jitsi-meet/config.js;
|
|
|
|
}
|
2021-02-01 08:50:38 +00:00
|
|
|
|
2021-02-01 17:19:43 +00:00
|
|
|
location = /interface_config.js {
|
|
|
|
alias /srv/jitsi-meet/interface_config.js;
|
2021-02-01 08:50:38 +00:00
|
|
|
}
|
2021-02-01 17:19:43 +00:00
|
|
|
|
|
|
|
location = /external_api.js {
|
|
|
|
alias /srv/jitsi-meet/libs/external_api.min.js;
|
2021-02-01 08:50:38 +00:00
|
|
|
}
|
|
|
|
|
2021-02-01 17:19:43 +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 /srv/jitsi-meet/$1/$2;
|
2021-02-01 08:50:38 +00:00
|
|
|
}
|
|
|
|
|
2021-02-01 17:19:43 +00:00
|
|
|
# not used yet VVV
|
|
|
|
# colibri (JVB) websockets
|
|
|
|
#location ~ ^/colibri-ws/([a-zA-Z0-9-\.]+)/(.*) {
|
|
|
|
# proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;
|
|
|
|
# proxy_http_version 1.1;
|
|
|
|
# proxy_set_header Upgrade $http_upgrade;
|
|
|
|
# proxy_set_header Connection "upgrade";
|
|
|
|
# tcp_nodelay on;
|
|
|
|
#}
|
|
|
|
|
|
|
|
location = /http-bind {
|
2021-02-01 11:42:29 +00:00
|
|
|
# We add CORS to use a different frontend which is useful for load testing as we do not want to advertise too much our URL
|
|
|
|
add_header 'Access-Control-Allow-Headers' 'content-type';
|
|
|
|
add_header 'Access-Control-Allow-Methods' 'GET,POST,PUT,DELETE,OPTIONS';
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
2021-02-01 10:22:16 +00:00
|
|
|
proxy_pass http://{{ env "NOMAD_ADDR_bosh_port" }}/http-bind;
|
2021-02-01 08:50:38 +00:00
|
|
|
proxy_set_header X-Forwarded-For \$remote_addr;
|
|
|
|
proxy_set_header Host \$http_host;
|
|
|
|
}
|
|
|
|
|
2021-02-01 17:19:43 +00:00
|
|
|
# not used yet VVV
|
|
|
|
# xmpp websockets
|
|
|
|
#location = /xmpp-websocket {
|
|
|
|
# proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/xmpp-websocket;
|
|
|
|
# proxy_http_version 1.1;
|
|
|
|
# proxy_set_header Connection "upgrade";
|
|
|
|
# proxy_set_header Upgrade $http_upgrade;
|
|
|
|
# proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
|
|
|
# proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
# tcp_nodelay on;
|
|
|
|
#}
|
|
|
|
|
|
|
|
location ~ ^/([^/?&:'"]+)$ {
|
|
|
|
try_files $uri @root_path;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @root_path {
|
|
|
|
rewrite ^/(.*)$ / break;
|
|
|
|
}
|
|
|
|
|
|
|
|
# Not used yet VVVV
|
|
|
|
# Etherpad-lite
|
|
|
|
# location /etherpad/ {
|
|
|
|
# proxy_http_version 1.1;
|
|
|
|
# proxy_set_header Upgrade $http_upgrade;
|
|
|
|
# proxy_set_header Connection 'upgrade';
|
|
|
|
# proxy_set_header Host $host;
|
|
|
|
# proxy_cache_bypass $http_upgrade;
|
|
|
|
# proxy_pass {{ .Env.ETHERPAD_URL_BASE }}/;
|
|
|
|
# proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
# proxy_buffering off;
|
|
|
|
# proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
|
|
|
# }
|
|
|
|
|
2021-02-01 08:50:38 +00:00
|
|
|
}
|
|
|
|
}
|