Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

77 Zeilen
2.0 KiB

  1. server {
  2. listen 80;
  3. server_name {{ hostname_matrix }};
  4. server_tokens off;
  5. location /.well-known/acme-challenge {
  6. {#
  7. The proxy can access the files directly.
  8. An external server likely does not have permission to read these files,
  9. so we'll just proxy to acme's :402 port.
  10. #}
  11. {%- if matrix_nginx_proxy_enabled -%}
  12. default_type "text/plain";
  13. alias {{ matrix_ssl_certs_path }}/run/acme-challenge;
  14. {%- else -%}
  15. proxy_pass http://localhost:402;
  16. {% endif %}
  17. }
  18. location / {
  19. return 301 https://$http_host$request_uri;
  20. }
  21. }
  22. server {
  23. listen 443 ssl http2;
  24. listen [::]:443 ssl http2;
  25. server_name {{ hostname_matrix }};
  26. server_tokens off;
  27. root /dev/null;
  28. gzip on;
  29. gzip_types text/plain text/html application/json;
  30. ssl_certificate {{ matrix_ssl_certs_path }}/live/{{ hostname_matrix }}/fullchain;
  31. ssl_certificate_key {{ matrix_ssl_certs_path }}/live/{{ hostname_matrix }}/privkey;
  32. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  33. ssl_prefer_server_ciphers on;
  34. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  35. {% if matrix_mxisd_enabled %}
  36. location /_matrix/identity {
  37. {% if matrix_nginx_proxy_enabled %}
  38. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  39. resolver 127.0.0.11 valid=5s;
  40. set $backend "matrix-mxisd:8090";
  41. proxy_pass http://$backend;
  42. {% else %}
  43. {# Generic configuration for use outside of our container setup #}
  44. proxy_pass http://localhost:8090;
  45. {% endif %}
  46. }
  47. {% endif %}
  48. location /_matrix {
  49. {% if matrix_nginx_proxy_enabled %}
  50. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  51. resolver 127.0.0.11 valid=5s;
  52. set $backend "matrix-synapse:8008";
  53. proxy_pass http://$backend;
  54. {% else %}
  55. {# Generic configuration for use outside of our container setup #}
  56. proxy_pass http://localhost:8008;
  57. {% endif %}
  58. proxy_set_header X-Forwarded-For $remote_addr;
  59. client_body_buffer_size 25M;
  60. client_max_body_size {{ matrix_synapse_max_upload_size_mb }}M;
  61. proxy_max_temp_file_size 0;
  62. }
  63. }