63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
|
server {
|
||
|
listen 80 default_server;
|
||
|
listen [::]:80 default_server;
|
||
|
server_name meet.example.com;
|
||
|
|
||
|
access_log /var/log/nginx/meet.example.com.access_log main;
|
||
|
error_log /var/log/nginx/meet.example.com.error_log info;
|
||
|
|
||
|
root /var/www/meet.example.com/htdocs;
|
||
|
|
||
|
if ($host = meet.example.com) {
|
||
|
return 301 https://$host$request_uri;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 443 ssl default_server;
|
||
|
listen [::]:443 ssl default_server;
|
||
|
server_name meet.example.com;
|
||
|
|
||
|
ssl_certificate /etc/ssl/nginx/nginx.pem;
|
||
|
ssl_certificate_key /etc/ssl/nginx/nginx.key;
|
||
|
|
||
|
access_log /var/log/nginx/meet.example.com.ssl_access_log main;
|
||
|
error_log /var/log/nginx/meet.example.com.ssl_error_log info;
|
||
|
|
||
|
root /usr/share/jitsi-meet;
|
||
|
ssi on;
|
||
|
index index.html index.htm;
|
||
|
error_page 404 /static/404.html;
|
||
|
|
||
|
location = /config.js {
|
||
|
alias /etc/jitsi/meet/meet.example.com-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
|
||
|
location = /bosh {
|
||
|
proxy_pass https://talk.example.com:5443/bosh;
|
||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||
|
proxy_set_header Host $http_host;
|
||
|
add_header Access-Control-Allow-Origin "*";
|
||
|
}
|
||
|
|
||
|
location ~ ^/([^/?&:'"]+)$ {
|
||
|
try_files $uri @root_path;
|
||
|
}
|
||
|
|
||
|
location @root_path {
|
||
|
rewrite ^/(.*)$ / break;
|
||
|
}
|
||
|
}
|