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.
 
 

204 lignes
6.7 KiB

  1. matrix.DOMAIN.tld {
  2. # creates letsencrypt certificate
  3. # tls your@email.com
  4. @identity {
  5. path /_matrix/identity/*
  6. }
  7. @noidentity {
  8. not path /_matrix/identity/*
  9. }
  10. @search {
  11. path /_matrix/client/r0/user_directory/search/*
  12. }
  13. @nosearch {
  14. not path /_matrix/client/r0/user_directory/search/*
  15. }
  16. @static {
  17. path /matrix/static-files/*
  18. }
  19. @nostatic {
  20. not path /matrix/static-files/*
  21. }
  22. header {
  23. # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  24. Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  25. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  26. X-XSS-Protection "1; mode=block"
  27. # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  28. X-Content-Type-Options "nosniff"
  29. # Disallow the site to be rendered within a frame (clickjacking protection)
  30. X-Frame-Options "DENY"
  31. # X-Robots-Tag
  32. X-Robots-Tag "noindex, noarchive, nofollow"
  33. }
  34. # Cache
  35. header @static {
  36. # Cache
  37. Cache-Control "public, max-age=31536000"
  38. defer
  39. }
  40. # identity
  41. handle @identity {
  42. reverse_proxy localhost:8090 {
  43. header_up X-Forwarded-Port {http.request.port}
  44. header_up X-Forwarded-Proto {http.request.scheme}
  45. header_up X-Forwarded-TlsProto {tls_protocol}
  46. header_up X-Forwarded-TlsCipher {tls_cipher}
  47. header_up X-Forwarded-HttpsProto {proto}
  48. }
  49. }
  50. # search
  51. handle @search {
  52. reverse_proxy localhost:8090 {
  53. header_up X-Forwarded-Port {http.request.port}
  54. header_up X-Forwarded-Proto {http.request.scheme}
  55. header_up X-Forwarded-TlsProto {tls_protocol}
  56. header_up X-Forwarded-TlsCipher {tls_cipher}
  57. header_up X-Forwarded-HttpsProto {proto}
  58. }
  59. }
  60. handle {
  61. encode zstd gzip
  62. reverse_proxy localhost:8008 {
  63. header_up X-Forwarded-Port {http.request.port}
  64. header_up X-Forwarded-Proto {http.request.scheme}
  65. header_up X-Forwarded-TlsProto {tls_protocol}
  66. header_up X-Forwarded-TlsCipher {tls_cipher}
  67. header_up X-Forwarded-HttpsProto {proto}
  68. }
  69. }
  70. }
  71. matrix.DOMAIN.tld:8448 {
  72. handle {
  73. encode zstd gzip
  74. reverse_proxy 127.0.0.1:8048 {
  75. header_up X-Forwarded-Port {http.request.port}
  76. header_up X-Forwarded-Proto {http.request.scheme}
  77. header_up X-Forwarded-TlsProto {tls_protocol}
  78. header_up X-Forwarded-TlsCipher {tls_cipher}
  79. header_up X-Forwarded-HttpsProto {proto}
  80. }
  81. }
  82. }
  83. element.DOMAIN.tld {
  84. # creates letsencrypt certificate
  85. # tls your@email.com
  86. header {
  87. # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  88. Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  89. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  90. X-XSS-Protection "1; mode=block"
  91. # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  92. X-Content-Type-Options "nosniff"
  93. # Disallow the site to be rendered within a frame (clickjacking protection)
  94. X-Frame-Options "DENY"
  95. # X-Robots-Tag
  96. X-Robots-Tag "noindex, noarchive, nofollow"
  97. }
  98. handle {
  99. encode zstd gzip
  100. reverse_proxy localhost:8765 {
  101. header_up X-Forwarded-Port {http.request.port}
  102. header_up X-Forwarded-Proto {http.request.scheme}
  103. header_up X-Forwarded-TlsProto {tls_protocol}
  104. header_up X-Forwarded-TlsCipher {tls_cipher}
  105. header_up X-Forwarded-HttpsProto {proto}
  106. }
  107. }
  108. #dimension.DOMAIN.tld {
  109. #
  110. # # creates letsencrypt certificate
  111. # # tls your@email.com
  112. #
  113. # header {
  114. # # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  115. # Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  116. # # Enable cross-site filter (XSS) and tell browser to block detected attacks
  117. # X-XSS-Protection "1; mode=block"
  118. # # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  119. # X-Content-Type-Options "nosniff"
  120. # # Disallow the site to be rendered within a frame (clickjacking protection)
  121. # X-Frame-Options "DENY"
  122. # # X-Robots-Tag
  123. # X-Robots-Tag "noindex, noarchive, nofollow"
  124. # }
  125. #
  126. # handle {
  127. # encode zstd gzip
  128. #
  129. # reverse_proxy localhost:8184 {
  130. # header_up X-Forwarded-Port {http.request.port}
  131. # header_up X-Forwarded-Proto {http.request.scheme}
  132. # header_up X-Forwarded-TlsProto {tls_protocol}
  133. # header_up X-Forwarded-TlsCipher {tls_cipher}
  134. # header_up X-Forwarded-HttpsProto {proto}
  135. # }
  136. # }
  137. #}
  138. #jitsi.DOMAIN.tld {
  139. #
  140. # creates letsencrypt certificate
  141. # tls your@email.com
  142. #
  143. # header {
  144. # # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  145. # Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  146. #
  147. # # Enable cross-site filter (XSS) and tell browser to block detected attacks
  148. # X-XSS-Protection "1; mode=block"
  149. #
  150. # # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  151. # X-Content-Type-Options "nosniff"
  152. #
  153. # # Disallow the site to be rendered within a frame (clickjacking protection)
  154. # X-Frame-Options "SAMEORIGIN"
  155. #
  156. # # Disable some features
  157. # Feature-Policy "accelerometer 'none';ambient-light-sensor 'none'; autoplay 'none';camera 'none';encrypted-media 'none';focus-without-user-activation 'none'; geolocation 'none';gyroscope #'none';magnetometer 'none';microphone 'none';midi 'none';payment 'none';picture-in-picture 'none'; speaker 'none';sync-xhr 'none';usb 'none';vr 'none'"
  158. #
  159. # # Referer
  160. # Referrer-Policy "no-referrer"
  161. #
  162. # # X-Robots-Tag
  163. # X-Robots-Tag "none"
  164. #
  165. # # Remove Server header
  166. # -Server
  167. # }
  168. #
  169. # handle {
  170. # encode zstd gzip
  171. #
  172. # reverse_proxy 127.0.0.1:13080 {
  173. # header_up X-Forwarded-Port {http.request.port}
  174. # header_up X-Forwarded-Proto {http.request.scheme}
  175. # header_up X-Forwarded-TlsProto {tls_protocol}
  176. # header_up X-Forwarded-TlsCipher {tls_cipher}
  177. # header_up X-Forwarded-HttpsProto {proto}
  178. # }
  179. # }
  180. #}