Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

206 řádky
6.9 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. 167,9 79%
  34. }
  35. # Cache
  36. header @static {
  37. # Cache
  38. Cache-Control "public, max-age=31536000"
  39. defer
  40. }
  41. # identity
  42. handle @identity {
  43. reverse_proxy localhost:8090 {
  44. header_up X-Forwarded-Port {http.request.port}
  45. header_up X-Forwarded-Proto {http.request.scheme}
  46. header_up X-Forwarded-TlsProto {tls_protocol}
  47. header_up X-Forwarded-TlsCipher {tls_cipher}
  48. header_up X-Forwarded-HttpsProto {proto}
  49. }
  50. }
  51. # search
  52. handle @search {
  53. reverse_proxy localhost:8090 {
  54. header_up X-Forwarded-Port {http.request.port}
  55. header_up X-Forwarded-Proto {http.request.scheme}
  56. header_up X-Forwarded-TlsProto {tls_protocol}
  57. header_up X-Forwarded-TlsCipher {tls_cipher}
  58. header_up X-Forwarded-HttpsProto {proto}
  59. }
  60. }
  61. handle {
  62. encode zstd gzip
  63. reverse_proxy localhost:8008 {
  64. header_up X-Forwarded-Port {http.request.port}
  65. header_up X-Forwarded-Proto {http.request.scheme}
  66. header_up X-Forwarded-TlsProto {tls_protocol}
  67. header_up X-Forwarded-TlsCipher {tls_cipher}
  68. header_up X-Forwarded-HttpsProto {proto}
  69. }
  70. }
  71. }
  72. matrix.DOMAIN.tld:8448 {
  73. handle {
  74. encode zstd gzip
  75. reverse_proxy 127.0.0.1:8048 {
  76. header_up X-Forwarded-Port {http.request.port}
  77. header_up X-Forwarded-Proto {http.request.scheme}
  78. header_up X-Forwarded-TlsProto {tls_protocol}
  79. header_up X-Forwarded-TlsCipher {tls_cipher}
  80. header_up X-Forwarded-HttpsProto {proto}
  81. }
  82. }
  83. }
  84. dimension.DOMAIN.tld {
  85. # creates letsencrypt certificate
  86. # tls your@email.com
  87. header {
  88. # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  89. Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  90. # Enable cross-site filter (XSS) and tell browser to block detected attacks
  91. X-XSS-Protection "1; mode=block"
  92. # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  93. X-Content-Type-Options "nosniff"
  94. # Disallow the site to be rendered within a frame (clickjacking protection)
  95. X-Frame-Options "DENY"
  96. # X-Robots-Tag
  97. X-Robots-Tag "noindex, noarchive, nofollow"
  98. }
  99. handle {
  100. encode zstd gzip
  101. reverse_proxy localhost:8184 {
  102. header_up X-Forwarded-Port {http.request.port}
  103. header_up X-Forwarded-Proto {http.request.scheme}
  104. header_up X-Forwarded-TlsProto {tls_protocol}
  105. header_up X-Forwarded-TlsCipher {tls_cipher}
  106. header_up X-Forwarded-HttpsProto {proto}
  107. }
  108. }
  109. }
  110. element.DOMAIN.tld {
  111. # creates letsencrypt certificate
  112. # tls your@email.com
  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. handle {
  126. encode zstd gzip
  127. reverse_proxy localhost:8765 {
  128. header_up X-Forwarded-Port {http.request.port}
  129. header_up X-Forwarded-Proto {http.request.scheme}
  130. header_up X-Forwarded-TlsProto {tls_protocol}
  131. header_up X-Forwarded-TlsCipher {tls_cipher}
  132. header_up X-Forwarded-HttpsProto {proto}
  133. }
  134. }
  135. #jitsi.DOMAIN.tld {
  136. # log {
  137. # output discard
  138. # }
  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:12080 {
  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. #}