Advertisement
Guest User

nginx conf

a guest
Dec 14th, 2020
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.09 KB | None | 0 0
  1. server_names_hash_bucket_size 64;
  2.  
  3. server {
  4. listen 80;
  5. listen [::]:80;
  6. server_name e-konf.waw.xxxxx.pl;
  7.  
  8. location ^~ /.well-known/acme-challenge/ {
  9. default_type "text/plain";
  10. root /usr/share/jitsi-meet;
  11. }
  12. location = /.well-known/acme-challenge/ {
  13. return 404;
  14. }
  15. location / {
  16. return 301 https://$host$request_uri;
  17. }
  18. }
  19. server {
  20. listen 443 ssl;
  21. listen [::]:443 ssl;
  22. server_name e-konf.waw.xxxx.pl;
  23.  
  24. # Mozilla Guideline v5.4, nginx 1.17.7, OpenSSL 1.1.1d, intermediate configuration
  25. ssl_protocols TLSv1.2 TLSv1.3;
  26. ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
  27. ssl_prefer_server_ciphers off;
  28.  
  29. ssl_session_timeout 1d;
  30. ssl_session_cache shared:SSL:10m; # about 40000 sessions
  31. ssl_session_tickets off;
  32.  
  33. add_header Strict-Transport-Security "max-age=63072000" always;
  34.  
  35. ssl_certificate /home/administrator/ssl/cert.pem;
  36. ssl_certificate_key /home/administrator/ssl/cert.key;
  37.  
  38. root /usr/share/jitsi-meet;
  39.  
  40. # ssi on with javascript for multidomain variables in config.js
  41. ssi on;
  42. ssi_types application/x-javascript application/javascript;
  43.  
  44. index index.html index.htm;
  45. error_page 404 /static/404.html;
  46.  
  47. gzip on;
  48. gzip_types text/plain text/css application/javascript application/json image/x-icon application/octet-stream application/wasm;
  49. gzip_vary on;
  50. gzip_proxied no-cache no-store private expired auth;
  51. gzip_min_length 512;
  52.  
  53. location = /config.js {
  54. alias /etc/jitsi/meet/e-konf.waw.xxxx.pl-config.js;
  55. }
  56.  
  57. location = /external_api.js {
  58. alias /usr/share/jitsi-meet/libs/external_api.min.js;
  59. }
  60.  
  61. #ensure all static content can always be found first
  62. location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$
  63. {
  64. add_header 'Access-Control-Allow-Origin' '*';
  65. alias /usr/share/jitsi-meet/$1/$2;
  66.  
  67. # cache all versioned files
  68. if ($arg_v) {
  69. expires 1y;
  70. }
  71. }
  72.  
  73. # BOSH
  74. location = /http-bind {
  75. proxy_pass http://localhost:5280/http-bind;
  76. proxy_set_header X-Forwarded-For $remote_addr;
  77. proxy_set_header Host $http_host;
  78. }
  79.  
  80. # xmpp websockets
  81. location = /xmpp-websocket {
  82. proxy_pass http://127.0.0.1:5280/xmpp-websocket?prefix=$prefix&$args;
  83. proxy_http_version 1.1;
  84. proxy_set_header Upgrade $http_upgrade;
  85. proxy_set_header Connection "upgrade";
  86. proxy_set_header Host $http_host;
  87. tcp_nodelay on;
  88. }
  89.  
  90. # colibri (JVB) websockets for jvb1
  91. location ~ ^/colibri-ws/default-id/(.*) {
  92. proxy_pass http://127.0.0.1:9090/colibri-ws/default-id/$1$is_args$args;
  93. proxy_http_version 1.1;
  94. proxy_set_header Upgrade $http_upgrade;
  95. proxy_set_header Connection "upgrade";
  96. tcp_nodelay on;
  97. }
  98.  
  99. location ~ ^/([^/?&:'"]+)$ {
  100. try_files $uri @root_path;
  101. }
  102.  
  103. location @root_path {
  104. rewrite ^/(.*)$ / break;
  105. }
  106.  
  107. location ~ ^/([^/?&:'"]+)/config.js$
  108. {
  109. set $subdomain "$1.";
  110. set $subdir "$1/";
  111.  
  112. alias /etc/jitsi/meet/e-konf.waw.xxxx.pl-config.js;
  113. }
  114.  
  115. #Anything that didn't match above, and isn't a real file, assume it's a room name and redirect to /
  116. location ~ ^/([^/?&:'"]+)/(.*)$ {
  117. set $subdomain "$1.";
  118. set $subdir "$1/";
  119. rewrite ^/([^/?&:'"]+)/(.*)$ /$2;
  120. }
  121.  
  122. # BOSH for subdomains
  123. location ~ ^/([^/?&:'"]+)/http-bind {
  124. set $subdomain "$1.";
  125. set $subdir "$1/";
  126. set $prefix "$1";
  127.  
  128. rewrite ^/(.*)$ /http-bind;
  129. }
  130.  
  131. # websockets for subdomains
  132. location ~ ^/([^/?&:'"]+)/xmpp-websocket {
  133. set $subdomain "$1.";
  134. set $subdir "$1/";
  135. set $prefix "$1";
  136.  
  137. rewrite ^/(.*)$ /xmpp-websocket;
  138. }
  139. }
  140.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement