You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

jitsi.example.com.multidomain.example 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. server {
  2. listen 80;
  3. server_name jitsi.example.com;
  4. # set the root
  5. root /srv/jitsi.example.com;
  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;
  10. set $prefix "";
  11. # BOSH
  12. location /http-bind {
  13. proxy_pass http://localhost:5280/http-bind;
  14. proxy_set_header X-Forwarded-For $remote_addr;
  15. proxy_set_header Host $http_host;
  16. }
  17. # xmpp websockets
  18. location /xmpp-websocket {
  19. proxy_pass http://localhost:5280/xmpp-websocket;
  20. proxy_http_version 1.1;
  21. proxy_set_header Upgrade $http_upgrade;
  22. proxy_set_header Connection "upgrade";
  23. proxy_set_header Host $host;
  24. tcp_nodelay on;
  25. }
  26. location ~ ^/([^/?&:'"]+)$ {
  27. try_files $uri @root_path;
  28. }
  29. location @root_path {
  30. rewrite ^/(.*)$ / break;
  31. }
  32. location ~ ^/([^/?&:'"]+)/config.js$
  33. {
  34. set $subdomain "$1.";
  35. set $subdir "$1/";
  36. alias /etc/jitsi/meet/{{jitsi_meet_domain_name}}-config.js;
  37. }
  38. #Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
  39. location ~ ^/([^/?&:'"]+)/(.*)$ {
  40. set $subdomain "$1.";
  41. set $subdir "$1/";
  42. rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
  43. }
  44. # BOSH for subdomains
  45. location ~ ^/([^/?&:'"]+)/http-bind {
  46. set $subdomain "$1.";
  47. set $subdir "$1/";
  48. set $prefix "$1";
  49. rewrite ^/(.*)$ /http-bind;
  50. }
  51. }