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

83 строки
2.6 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. <Location "/.well-known/matrix/server">
  48. Header always set Content-Type "application/json"
  49. </Location>
  50. <Directory /matrix/static-files/.well-known/matrix/>
  51. AllowOverride All
  52. # Apache 2.4:
  53. Require all granted
  54. # Or for Apache 2.2:
  55. #order allow,deny
  56. </Directory>
  57. # Map /_matrix/identity to the identity server
  58. <Location /_matrix/identity>
  59. ProxyPass http://127.0.0.1:8090/_matrix/identity
  60. </Location>
  61. # Map /_matrix/client/r0/user_directory/search to the identity server
  62. <Location /_matrix/client/r0/user_directory/search>
  63. ProxyPass http://127.0.0.1:8090/_matrix/client/r0/user_directory/search
  64. </Location>
  65. ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log
  66. CustomLog ${APACHE_LOG_DIR}/matrix.DOMAIN-access.log combined
  67. </VirtualHost>