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.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 / {
  33. ssi on;
  34. }
  35. location ~ ^/([^/?&:'"]+)/config.js$
  36. {
  37. set $subdomain "$1.";
  38. set $subdir "$1/";
  39. alias /etc/jitsi/meet/{{jitsi_meet_domain_name}}-config.js;
  40. }
  41. #Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
  42. location ~ ^/([^/?&:'"]+)/(.*)$ {
  43. set $subdomain "$1.";
  44. set $subdir "$1/";
  45. rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
  46. }
  47. # BOSH for subdomains
  48. location ~ ^/([^/?&:'"]+)/http-bind {
  49. set $subdomain "$1.";
  50. set $subdir "$1/";
  51. set $prefix "$1";
  52. rewrite ^/(.*)$ /http-bind;
  53. }
  54. }