Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

74 строки
2.3 KiB

  1. # This is a sample file demonstrating how to set up reverse-proxy for the matrix.DOMAIN
  2. <VirtualHost *:80>
  3. ServerName matrix.DOMAIN
  4. # Map /.well-known/acme-challenge to the certbot server
  5. # If you manage SSL certificates by yourself, this will differ.
  6. <Location /.well-known/acme-challenge>
  7. ProxyPreserveHost On
  8. ProxyRequests Off
  9. ProxyVia On
  10. ProxyPass http://127.0.0.1:2402/.well-known/acme-challenge
  11. </Location>
  12. Redirect permanent / https://matrix.DOMAIN/
  13. </VirtualHost>
  14. <VirtualHost *:443>
  15. ServerName matrix.DOMAIN
  16. SSLEngine On
  17. # If you manage SSL certificates by yourself, these paths will differ.
  18. SSLCertificateFile /matrix/ssl/config/live/matrix.DOMAIN/fullchain.pem
  19. SSLCertificateKeyFile /matrix/ssl/config/live/matrix.DOMAIN/privkey.pem
  20. SSLProxyEngine on
  21. SSLProxyProtocol +TLSv1.1 +TLSv1.2 +TLSv1.3
  22. SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
  23. ProxyPreserveHost On
  24. ProxyRequests Off
  25. ProxyVia On
  26. # Keep some URIs free for different proxy/location
  27. ProxyPassMatch ^/.well-known/matrix/client !
  28. ProxyPassMatch ^/_matrix/identity !
  29. ProxyPassMatch ^/_matrix/client/r0/user_directory/search !
  30. # Proxy all remaining traffic to Synapse
  31. ProxyPass / http://127.0.0.1:8008/
  32. ProxyPassReverse / http://127.0.0.1:8008/
  33. # Map /.well-known/matrix/client for client discovery
  34. Alias /.well-known/matrix/client /matrix/static-files/.well-known/matrix/client
  35. <Files "/matrix/static-files/.well-known/matrix/client">
  36. Require all granted
  37. </Files>
  38. <Location "/.well-known/matrix/client>
  39. Header always set Content-Type "application/json"
  40. Header always set Access-Control-Allow-Origin "*"
  41. </Location>
  42. <Directory /matrix/static-files/.well-known/matrix/>
  43. AllowOverride All
  44. # Apache 2.4:
  45. Require all granted
  46. # Or for Apache 2.2:
  47. #order allow,deny
  48. </Directory>
  49. # Map /_matrix/identity to the identity server
  50. <Location /_matrix/identity>
  51. ProxyPass http://127.0.0.1:8090/_matrix/identity
  52. </Location>
  53. # Map /_matrix/client/r0/user_directory/search to the identity server
  54. <Location /_matrix/client/r0/user_directory/search>
  55. ProxyPass http://127.0.0.1:8090/_matrix/client/r0/user_directory/search
  56. </Location>
  57. ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log
  58. CustomLog ${APACHE_LOG_DIR}/matrix.DOMAIN-access.log combined
  59. </VirtualHost>