Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
1,177
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None
  1. server_names_hash_bucket_size 64;
  2.  
  3. server {
  4. listen 80;
  5. server_name conference.mydomain.com;
  6.  
  7. location ^~ /.well-known/acme-challenge/ {
  8. default_type "text/plain";
  9. root /usr/share/jitsi-meet;
  10. }
  11.  
  12. location = /.well-known/acme-challenge/ {
  13. return 404;
  14. }
  15.  
  16. # return 301 https://$host$request_uri;
  17.  
  18. location / {
  19. return 301 https://$host$request_uri;
  20. }
  21. }
  22. server {
  23. listen 443 ssl;
  24. server_name conference.mydomain.com;
  25.  
  26. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  27. ssl_prefer_server_ciphers on;
  28. ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA256:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EDH+aRSA+AESGCM:EDH+aRSA+SHA256:EDH+aRSA:EECDH:!aNULL:!eNULL:!MEDIUM:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SEED";
  29.  
  30. add_header Strict-Transport-Security "max-age=31536000";
  31.  
  32. ssl_certificate /etc/ssl/conference.mydomain.com.crt;
  33. ssl_certificate_key /etc/ssl/conference.mydomain.com.key;
  34.  
  35. root /usr/share/jitsi-meet;
  36.  
  37. # ssi on with javascript for multidomain variables in config.js
  38. ssi on;
  39. index index.html index.htm;
  40. error_page 404 /static/404.html;
  41.  
  42. location = /config.js {
  43. alias /etc/jitsi/meet/conference.mydomain.com-config.js;
  44. }
  45.  
  46. location = /external_api.js {
  47. alias /usr/share/jitsi-meet/libs/external_api.min.js;
  48. }
  49.  
  50. #ensure all static content can always be found first
  51. location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
  52. {
  53. add_header 'Access-Control-Allow-Origin' '*';
  54. alias /usr/share/jitsi-meet/$1/$2;
  55. }
  56.  
  57. # BOSH
  58. location = /http-bind {
  59. proxy_pass http://localhost:5280/http-bind;
  60. proxy_set_header X-Forwarded-For $remote_addr;
  61. proxy_set_header Host $http_host;
  62. }
  63.  
  64. location ~ ^/([^/?&:'"]+)$ {
  65. try_files $uri @root_path;
  66. }
  67.  
  68. location @root_path {
  69. rewrite ^/(.*)$ / break;
  70. }
  71.  
  72. location ~ ^/([^/?&:'"]+)/config.js$
  73. {
  74. set $subdomain "$1.";
  75. set $subdir "$1/";
  76.  
  77. alias /etc/jitsi/meet/conference.mydomain.com-config.js;
  78. }
  79.  
  80. #Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
  81. location ~ ^/([^/?&:'"]+)/(.*)$ {
  82. set $subdomain "$1.";
  83. set $subdir "$1/";
  84. rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
  85. }
  86.  
  87. # BOSH for subdomains
  88. location ~ ^/([^/?&:'"]+)/http-bind {
  89. set $subdomain "$1.";
  90. set $subdir "$1/";
  91. set $prefix "$1";
  92.  
  93. rewrite ^/(.*)$ /http-bind;
  94. }
  95. }
Advertisement
RAW Paste Data Copied
Advertisement