meet.conf 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. {{ $ENABLE_COLIBRI_WEBSOCKET := .Env.ENABLE_COLIBRI_WEBSOCKET | default "1" | toBool }}
  2. {{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "1" | toBool }}
  3. server_name _;
  4. client_max_body_size 0;
  5. root /usr/share/jitsi-meet;
  6. # ssi on with javascript for multidomain variables in config.js
  7. ssi on;
  8. ssi_types application/x-javascript application/javascript;
  9. index index.html index.htm;
  10. error_page 404 /static/404.html;
  11. # Security headers
  12. add_header X-Content-Type-Options nosniff;
  13. add_header X-XSS-Protection "1; mode=block";
  14. location = /config.js {
  15. alias /config/config.js;
  16. }
  17. location = /interface_config.js {
  18. alias /config/interface_config.js;
  19. }
  20. location = /external_api.js {
  21. alias /usr/share/jitsi-meet/libs/external_api.min.js;
  22. }
  23. # ensure all static content can always be found first
  24. location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
  25. {
  26. add_header 'Access-Control-Allow-Origin' '*';
  27. alias /usr/share/jitsi-meet/$1/$2;
  28. }
  29. {{ if $ENABLE_COLIBRI_WEBSOCKET }}
  30. # colibri (JVB) websockets
  31. location ~ ^/colibri-ws/([a-zA-Z0-9-\.]+)/(.*) {
  32. proxy_pass http://$1:9090/colibri-ws/$1/$2$is_args$args;
  33. proxy_http_version 1.1;
  34. proxy_set_header Upgrade $http_upgrade;
  35. proxy_set_header Connection "upgrade";
  36. tcp_nodelay on;
  37. }
  38. {{ end }}
  39. # BOSH
  40. location = /http-bind {
  41. proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/http-bind;
  42. proxy_set_header X-Forwarded-For $remote_addr;
  43. proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
  44. }
  45. {{ if $ENABLE_XMPP_WEBSOCKET }}
  46. # xmpp websockets
  47. location = /xmpp-websocket {
  48. proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/xmpp-websocket;
  49. proxy_http_version 1.1;
  50. proxy_set_header Connection "upgrade";
  51. proxy_set_header Upgrade $http_upgrade;
  52. proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
  53. proxy_set_header X-Forwarded-For $remote_addr;
  54. tcp_nodelay on;
  55. }
  56. {{ end }}
  57. location ~ ^/([^/?&:'"]+)$ {
  58. try_files $uri @root_path;
  59. }
  60. location @root_path {
  61. rewrite ^/(.*)$ / break;
  62. }
  63. {{ if .Env.ETHERPAD_URL_BASE }}
  64. # Etherpad-lite
  65. location /etherpad/ {
  66. proxy_http_version 1.1;
  67. proxy_set_header Upgrade $http_upgrade;
  68. proxy_set_header Connection 'upgrade';
  69. proxy_cache_bypass $http_upgrade;
  70. proxy_pass {{ .Env.ETHERPAD_URL_BASE }}/;
  71. proxy_set_header X-Forwarded-For $remote_addr;
  72. proxy_buffering off;
  73. }
  74. {{ end }}