web: refactor nginx configuration
This commit is contained in:
parent
f61ef3f093
commit
5c988de8b6
|
@ -1,41 +1,12 @@
|
||||||
server {
|
server {
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
|
|
||||||
|
include /config/nginx/meet.conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
include /config/nginx/ssl.conf;
|
include /config/nginx/ssl.conf;
|
||||||
|
include /config/nginx/meet.conf;
|
||||||
client_max_body_size 0;
|
|
||||||
|
|
||||||
root /usr/share/jitsi-meet;
|
|
||||||
index index.html
|
|
||||||
error_page 404 /static/404.html;
|
|
||||||
|
|
||||||
location ~ ^/([a-zA-Z0-9=\?]+)$ {
|
|
||||||
rewrite ^/(.*)$ / break;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /config.js {
|
|
||||||
alias /config/config.js;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /interface_config.js {
|
|
||||||
alias /config/interface_config.js;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /external_api.js {
|
|
||||||
alias /usr/share/jitsi-meet/libs/external_api.min.js;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
ssi on;
|
|
||||||
}
|
|
||||||
|
|
||||||
# BOSH
|
|
||||||
location /http-bind {
|
|
||||||
proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/http-bind;
|
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
|
||||||
proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
34
web/rootfs/defaults/meet.conf
Normal file
34
web/rootfs/defaults/meet.conf
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
client_max_body_size 0;
|
||||||
|
|
||||||
|
root /usr/share/jitsi-meet;
|
||||||
|
index index.html
|
||||||
|
error_page 404 /static/404.html;
|
||||||
|
|
||||||
|
location ~ ^/([a-zA-Z0-9=\?]+)$ {
|
||||||
|
rewrite ^/(.*)$ / break;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /config.js {
|
||||||
|
alias /config/config.js;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /interface_config.js {
|
||||||
|
alias /config/interface_config.js;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /external_api.js {
|
||||||
|
alias /usr/share/jitsi-meet/libs/external_api.min.js;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
ssi on;
|
||||||
|
}
|
||||||
|
|
||||||
|
# BOSH
|
||||||
|
location /http-bind {
|
||||||
|
proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/http-bind;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
||||||
|
}
|
|
@ -35,6 +35,10 @@ if [[ ! -f /config/nginx/nginx.conf ]]; then
|
||||||
cp /defaults/nginx.conf /config/nginx/nginx.conf
|
cp /defaults/nginx.conf /config/nginx/nginx.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f /config/nginx/meet.conf ]]; then
|
||||||
|
tpl /defaults/meet.conf > /config/nginx/meet.conf
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ! -f /config/nginx/ssl.conf ]]; then
|
if [[ ! -f /config/nginx/ssl.conf ]]; then
|
||||||
tpl /defaults/ssl.conf > /config/nginx/ssl.conf
|
tpl /defaults/ssl.conf > /config/nginx/ssl.conf
|
||||||
fi
|
fi
|
||||||
|
@ -44,7 +48,7 @@ if [ ! -f "/config/nginx/dhparams.pem" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f /config/nginx/site-confs/default ]]; then
|
if [[ ! -f /config/nginx/site-confs/default ]]; then
|
||||||
tpl /defaults/default > /config/nginx/site-confs/default
|
cp /defaults/default /config/nginx/site-confs/default
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f /config/config.js ]]; then
|
if [[ ! -f /config/config.js ]]; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user