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

80 строки
2.5 KiB

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