Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

78 行
2.3 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2024 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  4. #
  5. # SPDX-License-Identifier: AGPL-3.0-or-later
  6. # This is a sample file demonstrating how to set up reverse-proxy for matrix.example.com
  7. <VirtualHost *:80>
  8. ServerName matrix.example.com
  9. # You may wish to handle the /.well-known/acme-challenge paths here somehow,
  10. # if you're using ACME (Let's Encrypt) certificates.
  11. Redirect permanent / https://matrix.example.com/
  12. </VirtualHost>
  13. # Client-Server API
  14. <VirtualHost *:443>
  15. ServerName matrix.example.com
  16. SSLEngine On
  17. # If you manage SSL certificates by yourself, these paths will differ.
  18. SSLCertificateFile /path/to/matrix.example.com/fullchain.pem
  19. SSLCertificateKeyFile /path/to/matrix.example.com/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. RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
  27. ProxyTimeout 86400
  28. RewriteEngine On
  29. RewriteCond %{HTTP:Connection} Upgrade [NC]
  30. RewriteCond %{HTTP:Upgrade} websocket [NC]
  31. RewriteRule /(.*) ws://127.0.0.1:81/$1 [P,L]
  32. AllowEncodedSlashes NoDecode
  33. ProxyPass / http://127.0.0.1:81/ retry=0 nocanon
  34. ProxyPassReverse / http://127.0.0.1:81/
  35. ErrorLog ${APACHE_LOG_DIR}/matrix.example.com-error.log
  36. CustomLog ${APACHE_LOG_DIR}/matrix.example.com-access.log combined
  37. </VirtualHost>
  38. # Server-Server (federation) API
  39. Listen 8448
  40. <VirtualHost *:8448>
  41. ServerName matrix.example.com
  42. SSLEngine On
  43. # If you manage SSL certificates by yourself, these paths will differ.
  44. SSLCertificateFile /matrix/ssl/config/live/matrix.example.com/fullchain.pem
  45. SSLCertificateKeyFile /matrix/ssl/config/live/matrix.example.com/privkey.pem
  46. SSLProxyEngine on
  47. SSLProxyProtocol +TLSv1.2 +TLSv1.3
  48. SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
  49. ProxyPreserveHost On
  50. ProxyRequests Off
  51. ProxyVia On
  52. RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
  53. AllowEncodedSlashes NoDecode
  54. ProxyPass / http://127.0.0.1:8449/ retry=0 nocanon
  55. ProxyPassReverse / http://127.0.0.1:8449/
  56. ErrorLog ${APACHE_LOG_DIR}/matrix.example.com-error.log
  57. CustomLog ${APACHE_LOG_DIR}/matrix.example.com-access.log combined
  58. </VirtualHost>