diff --git a/web/rootfs/defaults/default b/web/rootfs/defaults/default index ddc8b13..5ae5b71 100644 --- a/web/rootfs/defaults/default +++ b/web/rootfs/defaults/default @@ -1,41 +1,12 @@ server { listen 80 default_server; + + include /config/nginx/meet.conf; +} + +server { listen 443 ssl; - server_name _; - include /config/nginx/ssl.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 }}; - } + include /config/nginx/meet.conf; } diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf new file mode 100644 index 0000000..876325d --- /dev/null +++ b/web/rootfs/defaults/meet.conf @@ -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 }}; +} diff --git a/web/rootfs/etc/cont-init.d/10-config b/web/rootfs/etc/cont-init.d/10-config index 5accece..d61a3f1 100644 --- a/web/rootfs/etc/cont-init.d/10-config +++ b/web/rootfs/etc/cont-init.d/10-config @@ -35,6 +35,10 @@ if [[ ! -f /config/nginx/nginx.conf ]]; then cp /defaults/nginx.conf /config/nginx/nginx.conf fi +if [[ ! -f /config/nginx/meet.conf ]]; then + tpl /defaults/meet.conf > /config/nginx/meet.conf +fi + if [[ ! -f /config/nginx/ssl.conf ]]; then tpl /defaults/ssl.conf > /config/nginx/ssl.conf fi @@ -44,7 +48,7 @@ if [ ! -f "/config/nginx/dhparams.pem" ]; then fi 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 if [[ ! -f /config/config.js ]]; then