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 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. gzip on;
  27. gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
  28. gzip_vary on;
  29. gzip_proxied no-cache no-store private expired auth;
  30. gzip_min_length 512;
  31. location ~ ^/([^/?&:'"]+)$ {
  32. try_files $uri @root_path;
  33. }
  34. location @root_path {
  35. rewrite ^/(.*)$ / break;
  36. }
  37. location ~ ^/([^/?&:'"]+)/config.js$
  38. {
  39. set $subdomain "$1.";
  40. set $subdir "$1/";
  41. alias /etc/jitsi/meet/{{jitsi_meet_domain_name}}-config.js;
  42. }
  43. #Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
  44. location ~ ^/([^/?&:'"]+)/(.*)$ {
  45. set $subdomain "$1.";
  46. set $subdir "$1/";
  47. rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
  48. }
  49. # BOSH for subdomains
  50. location ~ ^/([^/?&:'"]+)/http-bind {
  51. set $subdomain "$1.";
  52. set $subdir "$1/";
  53. set $prefix "$1";
  54. rewrite ^/(.*)$ /http-bind;
  55. }
  56. # websockets for subdomains
  57. location ~ ^/([^/?&:'"]+)/xmpp-websocket {
  58. set $subdomain "$1.";
  59. set $subdir "$1/";
  60. set $prefix "$1";
  61. rewrite ^/(.*)$ /xmpp-websocket;
  62. }
  63. }