Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

54 řádky
1.7 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. server {
  3. listen {{ 8080 if matrix_nginx_proxy_enabled else 80 }};
  4. server_name {{ matrix_nginx_proxy_base_domain_hostname }};
  5. server_tokens off;
  6. location /.well-known/acme-challenge {
  7. {% if matrix_nginx_proxy_enabled %}
  8. {# Use the embedded DNS resolver in Docker containers to discover the service #}
  9. resolver 127.0.0.11 valid=5s;
  10. set $backend "matrix-certbot:8080";
  11. proxy_pass http://$backend;
  12. {% else %}
  13. {# Generic configuration for use outside of our container setup #}
  14. proxy_pass http://127.0.0.1:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }};
  15. {% endif %}
  16. }
  17. location / {
  18. return 301 https://$http_host$request_uri;
  19. }
  20. }
  21. server {
  22. listen {{ 8443 if matrix_nginx_proxy_enabled else 443 }} ssl http2;
  23. listen [::]:{{ 8443 if matrix_nginx_proxy_enabled else 443 }} ssl http2;
  24. server_name {{ matrix_nginx_proxy_base_domain_hostname }};
  25. server_tokens off;
  26. root /nginx-data/matrix-domain;
  27. gzip on;
  28. gzip_types text/plain application/json;
  29. ssl_certificate {{ matrix_ssl_config_dir_path }}/live/{{ matrix_nginx_proxy_base_domain_hostname }}/fullchain.pem;
  30. ssl_certificate_key {{ matrix_ssl_config_dir_path }}/live/{{ matrix_nginx_proxy_base_domain_hostname }}/privkey.pem;
  31. ssl_protocols {{ matrix_nginx_proxy_ssl_protocols }};
  32. ssl_prefer_server_ciphers on;
  33. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  34. location /.well-known/matrix {
  35. root {{ matrix_static_files_base_path }};
  36. {#
  37. A somewhat long expires value is used to prevent outages
  38. in case this is unreachable due to network failure.
  39. #}
  40. expires 4h;
  41. default_type application/json;
  42. add_header Access-Control-Allow-Origin *;
  43. }
  44. }