Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

53 regels
1.6 KiB

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