Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

88 satır
2.6 KiB

  1. server {
  2. listen 80;
  3. server_name {{ hostname_matrix }};
  4. server_tokens off;
  5. location /.well-known/acme-challenge {
  6. {% if matrix_nginx_proxy_enabled %}
  7. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  8. resolver 127.0.0.11 valid=5s;
  9. set $backend "matrix-certbot:80";
  10. proxy_pass http://$backend;
  11. {% else %}
  12. {# Generic configuration for use outside of our container setup #}
  13. proxy_pass http://localhost:{{ matrix_ssl_certbot_standalone_http_port }};
  14. {% endif %}
  15. }
  16. location / {
  17. return 301 https://$http_host$request_uri;
  18. }
  19. }
  20. server {
  21. listen 443 ssl http2;
  22. listen [::]:443 ssl http2;
  23. server_name {{ hostname_matrix }};
  24. server_tokens off;
  25. root /dev/null;
  26. gzip on;
  27. gzip_types text/plain application/json;
  28. ssl_certificate {{ matrix_ssl_config_dir_path }}/live/{{ hostname_matrix }}/fullchain.pem;
  29. ssl_certificate_key {{ matrix_ssl_config_dir_path }}/live/{{ hostname_matrix }}/privkey.pem;
  30. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  31. ssl_prefer_server_ciphers on;
  32. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  33. {% if matrix_corporal_enabled and matrix_corporal_http_api_enabled %}
  34. location /_matrix/corporal {
  35. {% if matrix_nginx_proxy_enabled %}
  36. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  37. resolver 127.0.0.11 valid=5s;
  38. set $backend "matrix-corporal:41081";
  39. proxy_pass http://$backend;
  40. {% else %}
  41. {# Generic configuration for use outside of our container setup #}
  42. proxy_pass http://localhost:41081;
  43. {% endif %}
  44. }
  45. {% endif %}
  46. {% if matrix_mxisd_enabled %}
  47. location /_matrix/identity {
  48. {% if matrix_nginx_proxy_enabled %}
  49. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  50. resolver 127.0.0.11 valid=5s;
  51. set $backend "matrix-mxisd:8090";
  52. proxy_pass http://$backend;
  53. {% else %}
  54. {# Generic configuration for use outside of our container setup #}
  55. proxy_pass http://localhost:8090;
  56. {% endif %}
  57. }
  58. {% endif %}
  59. location /_matrix {
  60. {% if matrix_nginx_proxy_enabled %}
  61. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  62. resolver 127.0.0.11 valid=5s;
  63. set $backend "{{ matrix_nginx_proxy_matrix_client_api_addr_with_proxy_container }}";
  64. proxy_pass http://$backend;
  65. {% else %}
  66. {# Generic configuration for use outside of our container setup #}
  67. proxy_pass http://{{ matrix_nginx_proxy_matrix_client_api_addr_sans_proxy_container }};
  68. {% endif %}
  69. proxy_set_header X-Forwarded-For $remote_addr;
  70. client_body_buffer_size 25M;
  71. client_max_body_size {{ matrix_synapse_max_upload_size_mb }}M;
  72. proxy_max_temp_file_size 0;
  73. }
  74. }