Snippet content copied to clipboard.
Are you sure to delete this snippet? No, don't delete
  1. server
  2. {
  3. listen 80;
  4. listen 443 ssl;
  5. server_name FRONT_END_URL;
  6. #SSL-START SSL related configuration, do NOT delete or modify the next line of commented-out 404 rules
  7. #error_page 404/404.html;
  8. ssl_certificate /etc/nginx/cert/cert.crt;
  9. ssl_certificate_key /etc/nginx/cert/cert.key;
  10. ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
  11. ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
  12. ssl_prefer_server_ciphers on;
  13. ssl_session_cache shared:SSL:10m;
  14. ssl_session_timeout 10m;
  15. add_header Strict-Transport-Security "max-age=31536000";
  16. error_page 497 https://$host$request_uri;
  17. #SSL-END
  18. # Forbidden files or directories
  19. location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
  20. {
  21. return 404;
  22. }
  23. location /.well-known/matrix/client {
  24. return 200 '{"m.homeserver": {"base_url": "BACK_END_URL"}}';
  25. default_type application/json;
  26. add_header Access-Control-Allow-Origin *;
  27. }
  28. location /.well-known/matrix/server {
  29. return 200 '{"m.server": "BACK_END_URL:443"}';
  30. default_type application/json;
  31. add_header Access-Control-Allow-Origin *;
  32. }
  33. }

Edit this Snippet