Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

133 lignes
4.8 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. # Client-Server API
  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.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 ^/.well-known/matrix/server !
  29. ProxyPassMatch ^/_matrix/identity !
  30. ProxyPassMatch ^/_matrix/client/r0/user_directory/search !
  31. # Proxy all remaining traffic to Synapse
  32. AllowEncodedSlashes NoDecode
  33. ProxyPass /_matrix http://127.0.0.1:8008/_matrix retry=0 nocanon
  34. ProxyPassReverse /_matrix http://127.0.0.1:8008/_matrix
  35. ProxyPass /_synapse/client http://127.0.0.1:8008/_synapse/client retry=0 nocanon
  36. ProxyPassReverse /_synapse/client http://127.0.0.1:8008/_synapse/client
  37. # Proxy Admin API (necessary for Synapse-Admin)
  38. # ProxyPass /_synapse/admin http://127.0.0.1:8008/_synapse/admin retry=0 nocanon
  39. # ProxyPassReverse /_synapse/admin http://127.0.0.1:8008/_synapse/admin
  40. # Proxy Synapse-Admin
  41. # ProxyPass /synapse-admin http://127.0.0.1:8766 retry=0 nocanon
  42. # ProxyPassReverse /synapse-admin http://127.0.0.1:8766
  43. # Map /.well-known/matrix/client for client discovery
  44. Alias /.well-known/matrix/client /matrix/static-files/.well-known/matrix/client
  45. <Files "/matrix/static-files/.well-known/matrix/client">
  46. Require all granted
  47. </Files>
  48. <Location "/.well-known/matrix/client">
  49. Header always set Content-Type "application/json"
  50. Header always set Access-Control-Allow-Origin "*"
  51. </Location>
  52. # Map /.well-known/matrix/server for server discovery
  53. Alias /.well-known/matrix/server /matrix/static-files/.well-known/matrix/server
  54. <Files "/matrix/static-files/.well-known/matrix/server">
  55. Require all granted
  56. </Files>
  57. <Location "/.well-known/matrix/server">
  58. Header always set Content-Type "application/json"
  59. </Location>
  60. <Directory /matrix/static-files/.well-known/matrix/>
  61. AllowOverride All
  62. # Apache 2.4:
  63. Require all granted
  64. # Or for Apache 2.2:
  65. #order allow,deny
  66. </Directory>
  67. # Map /_matrix/identity to the identity server
  68. <Location /_matrix/identity>
  69. ProxyPass http://127.0.0.1:8090/_matrix/identity nocanon
  70. </Location>
  71. # Map /_matrix/client/r0/user_directory/search to the identity server
  72. <Location /_matrix/client/r0/user_directory/search>
  73. ProxyPass http://127.0.0.1:8090/_matrix/client/r0/user_directory/search nocanon
  74. </Location>
  75. ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log
  76. CustomLog ${APACHE_LOG_DIR}/matrix.DOMAIN-access.log combined
  77. </VirtualHost>
  78. # Server-Server (federation) API
  79. # Use this apache reverse proxy template to enable matrix server-to-server federation traffic
  80. # Be sure that network traffic on port 8448 is possible
  81. #
  82. # You can check your federation config at https://federationtester.matrix.org/
  83. # Enter there your base DOMAIN address, NOT your matrix.DOMAIN address, ex. https://DOMAIN
  84. #
  85. # In this example we use all services on the same machine (127.0.0.1) but you can do this with different machines.
  86. # If you do so be sure to reach the destinated IPADRESS and the correspondending port. Check this with netstat, nmap or your favourite tool.
  87. Listen 8448
  88. <VirtualHost *:8448>
  89. ServerName matrix.DOMAIN
  90. SSLEngine On
  91. # If you manage SSL certificates by yourself, these paths will differ.
  92. SSLCertificateFile /matrix/ssl/config/live/matrix.DOMAIN/fullchain.pem
  93. SSLCertificateKeyFile /matrix/ssl/config/live/matrix.DOMAIN/privkey.pem
  94. SSLProxyEngine on
  95. SSLProxyProtocol +TLSv1.2 +TLSv1.3
  96. SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
  97. ProxyPreserveHost On
  98. ProxyRequests Off
  99. ProxyVia On
  100. # Proxy all remaining traffic to the Synapse port
  101. # Beware: In this example the local traffic goes to the local synapse server at 127.0.0.1
  102. # Of course you can use another IPADRESS in case of using other synapse servers in your network
  103. AllowEncodedSlashes NoDecode
  104. ProxyPass /_matrix http://127.0.0.1:8048/_matrix retry=0 nocanon
  105. ProxyPassReverse /_matrix http://127.0.0.1:8048/_matrix
  106. ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log
  107. CustomLog ${APACHE_LOG_DIR}/matrix.DOMAIN-access.log combined
  108. </VirtualHost>