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

204 строки
7.0 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. element.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:8765 {
  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. #dimension.DOMAIN.tld {
  110. #
  111. # # creates letsencrypt certificate
  112. # # tls your@email.com
  113. #
  114. # header {
  115. # # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  116. # Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  117. # # Enable cross-site filter (XSS) and tell browser to block detected attacks
  118. # X-XSS-Protection "1; mode=block"
  119. # # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  120. # X-Content-Type-Options "nosniff"
  121. # # Disallow the site to be rendered within a frame (clickjacking protection)
  122. # X-Frame-Options "DENY"
  123. # # X-Robots-Tag
  124. # X-Robots-Tag "noindex, noarchive, nofollow"
  125. # }
  126. #
  127. # handle {
  128. # encode zstd gzip
  129. #
  130. # reverse_proxy localhost:8184 {
  131. # header_up X-Forwarded-Port {http.request.port}
  132. # header_up X-Forwarded-Proto {http.request.scheme}
  133. # header_up X-Forwarded-TlsProto {tls_protocol}
  134. # header_up X-Forwarded-TlsCipher {tls_cipher}
  135. # header_up X-Forwarded-HttpsProto {proto}
  136. # }
  137. # }
  138. #}
  139. #jitsi.DOMAIN.tld {
  140. #
  141. # creates letsencrypt certificate
  142. # tls your@email.com
  143. #
  144. # header {
  145. # # Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
  146. # Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
  147. #
  148. # # Enable cross-site filter (XSS) and tell browser to block detected attacks
  149. # X-XSS-Protection "1; mode=block"
  150. #
  151. # # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
  152. # X-Content-Type-Options "nosniff"
  153. #
  154. # # Disallow the site to be rendered within a frame (clickjacking protection)
  155. # X-Frame-Options "SAMEORIGIN"
  156. #
  157. # # Disable some features
  158. # 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'"
  159. #
  160. # # Referer
  161. # Referrer-Policy "no-referrer"
  162. #
  163. # # X-Robots-Tag
  164. # X-Robots-Tag "none"
  165. #
  166. # # Remove Server header
  167. # -Server
  168. # }
  169. #
  170. # handle {
  171. # encode zstd gzip
  172. #
  173. # reverse_proxy 127.0.0.1:12080 {
  174. # header_up X-Forwarded-Port {http.request.port}
  175. # header_up X-Forwarded-Proto {http.request.scheme}
  176. # header_up X-Forwarded-TlsProto {tls_protocol}
  177. # header_up X-Forwarded-TlsCipher {tls_cipher}
  178. # header_up X-Forwarded-HttpsProto {proto}
  179. # }
  180. # }
  181. #}