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ů.
 
 

58 řádky
1.9 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. server {
  3. listen {{ 8080 if matrix_nginx_proxy_enabled else 80 }};
  4. server_name {{ matrix_nginx_proxy_proxy_dimension_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_proxy_dimension_hostname }};
  25. server_tokens off;
  26. root /dev/null;
  27. gzip on;
  28. gzip_types text/plain application/json application/javascript text/css image/x-icon font/ttf image/gif;
  29. ssl_certificate {{ matrix_ssl_config_dir_path }}/live/{{ matrix_nginx_proxy_proxy_dimension_hostname }}/fullchain.pem;
  30. ssl_certificate_key {{ matrix_ssl_config_dir_path }}/live/{{ matrix_nginx_proxy_proxy_dimension_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 / {
  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-dimension:8184";
  39. proxy_pass http://$backend;
  40. {% else %}
  41. {# Generic configuration for use outside of our container setup #}
  42. proxy_pass http://127.0.0.1:8184;
  43. {% endif %}
  44. proxy_set_header Host $host;
  45. proxy_set_header X-Forwarded-For $remote_addr;
  46. }
  47. }