只是想知道是否有人已经在 Apache Web 服务器而不是默认的 nginx 后面运行了 Dendrite 主服务器。
我使用本指南安装了 Dendrite:https://pieterhollander.nl/post/dendrite-matrix-homeserver/-- 只是我选择了 sqlite 作为数据库。我想将主服务器集成到使用 Apache Web 服务器的现有 Nextcloudpi 上。我该如何将 nginx 配置正确转换为 Apache 配置?我让它运行得足够好,以至于 federationtester 返回成功,并且我从服务器收到了对我的 matrix.org 帐户的邀请,但是当我在桌面 Element 上接受邀请时,它只显示“未经授权”。在 Android Element 应用程序上,我收到“无法通过任何服务器 make_join”的提示。这是 Apache 配置:
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
DocumentRoot /var/www/nextcloud
CustomLog /var/log/apache2/nc-access.log combined
ErrorLog /var/log/apache2/nc-error.log
SSLEngine on
ServerName my.domain.net
SSLCertificateFile /etc/letsencrypt/live/my.domain.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my.domain.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLProxyEngine On
<Location /_matrix>
ProxyPass http://localhost:8008/_matrix
ProxyPassReverse http://localhost:8008/_matrix
</Location>
<Location /.well-known/matrix/server>
ErrorDocument 200 '{ "m.server": "my.domain.net:443" }'
RewriteEngine On
RewriteRule .* - [R=200]
</Location>
<Location /.well-known/matrix/client>
ErrorDocument 200 '{ "m.homeserver": { "base_url": "https://my.domain.net" } }'
RewriteEngine On
RewriteRule .* - [R=200]
</Location>
</VirtualHost>
<VirtualHost *:8448>
DocumentRoot /var/www/nextcloud
CustomLog /var/log/apache2/nc-access.log combined
ErrorLog /var/log/apache2/nc-error.log
SSLEngine on
ServerName my.domain.net
SSLCertificateFile /etc/letsencrypt/live/my.domain.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my.domain.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
AllowEncodedSlashes NoDecode
SSLProxyEngine On
<Location /_matrix>
ProxyPass http://localhost:8008/_matrix
ProxyPassReverse http://localhost:8008/_matrix
</Location>
</VirtualHost>
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
LimitRequestBody 0
SSLRenegBufferSize 10486000
</Directory>
</IfModule>
有什么想法缺少什么或如何调试它吗?
更新 - Element Web 应用程序(Chromium)上的本地用户 t 的访问日志,尝试使用 Firefox 中的 Element Web 应用程序邀请另一个用户 thomas(省略了 ip 地址和时间戳):
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s26_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s26_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s25_4_14_3_3_16.dl-0-6 HTTP/2.0" 200 223 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/keys/upload HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s25_4_14_3_3_16.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"POST /_matrix/client/r0/keys/upload HTTP/2.0" 200 57 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"POST /_matrix/client/r0/keys/upload HTTP/2.0" 200 80 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/createRoom HTTP/2.0" 200 52 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s25_4_14_3_3_16.dl-0-6 HTTP/2.0" 200 943 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/keys/query HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s28_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/thirdparty/user/im.vector.protocol.sip_native HTTP/2.0" 404 90 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"POST /_matrix/client/r0/keys/query HTTP/2.0" 200 581 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/profile/%40t%3Amy.domain.net HTTP/2.0" 200 33 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/profile/%40t%3Amy.domain.net HTTP/2.0" 200 67 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s28_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 1740 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s29_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s29_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 2400 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s30_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s30_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 2753 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s31_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s31_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 3142 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s32_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s26_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 223 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s26_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 200 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/keys/upload HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s26_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/keys/upload HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s26_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"POST /_matrix/client/r0/keys/upload HTTP/2.0" 200 57 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"POST /_matrix/client/r0/keys/upload HTTP/2.0" 200 57 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s32_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 3488 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s33_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"POST /_matrix/client/r0/createRoom HTTP/2.0" 200 79 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/user/%40t%3Amy.domain.net/account_data/im.vector.setting.breadcrumbs HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/read_markers HTTP/2.0" 200 52 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/members?not_membership=leave&at=s33_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/messages?from=t1_27&limit=20&dir=b&filter=%7B%22lazy_load_members%22%3Atrue%7D HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/members?not_membership=leave&at=s33_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 321 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"PUT /_matrix/client/r0/user/%40t%3Amy.domain.net/account_data/im.vector.setting.breadcrumbs HTTP/2.0" 200 32 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/messages?from=t1_27&limit=20&dir=b&filter=%7B%22lazy_load_members%22%3Atrue%7D HTTP/2.0" 200 343 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"POST /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/read_markers HTTP/2.0" 200 32 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/messages?from=t0_0&limit=20&dir=b&filter=%7B%22lazy_load_members%22%3Atrue%7D HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/messages?from=t0_0&limit=20&dir=b&filter=%7B%22lazy_load_members%22%3Atrue%7D HTTP/2.0" 200 71 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s33_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 3852 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s34_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s34_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 658 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s34_6_14_3_3_20.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"POST /_matrix/client/r0/keys/upload HTTP/2.0" 200 105 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"POST /_matrix/client/r0/keys/upload HTTP/2.0" 200 82 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"POST /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/read_markers HTTP/2.0" 200 55 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s34_6_14_3_3_20.dl-0-6 HTTP/2.0" 200 504 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s34_6_14_3_3_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/profile/%40thomas%3Amy.domain.net HTTP/2.0" 200 53 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/profile/%40thomas%3Amy.domain.net HTTP/2.0" 200 72 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/invite HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"POST /_matrix/client/r0/rooms/!YRn08BdBHS9M0eBG%3Amy.domain.net/invite HTTP/2.0" 200 32 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s34_6_14_3_3_21.dl-0-6 HTTP/2.0" 200 1487 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s26_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 1365 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s26_6_14_3_3_18.dl-0-6 HTTP/2.0" 200 1342 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s34_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/thirdparty/user/im.vector.protocol.sip_native HTTP/2.0" 404 90 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s34_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/thirdparty/user/im.vector.protocol.sip_native HTTP/2.0" 404 48 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s34_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 279 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s34_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 256 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/presence/%40thomas%3Amy.domain.net/status HTTP/2.0" 200 52 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"PUT /_matrix/client/r0/presence/%40thomas%3Amy.domain.net/status HTTP/2.0" 200 32 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 223 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 223 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 200 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=2&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 223 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"OPTIONS /_matrix/client/r0/sync?filter=2&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 223 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"GET /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 200 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
"OPTIONS /_matrix/client/r0/sync?filter=1&timeout=30000&since=s35_6_14_3_4_21.dl-0-6 HTTP/2.0" 200 29 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0"
(这种情况下结果是托马斯没有收到任何邀请。)
更新 2.1 - 应用程序日志(/var/log/dendrite)中用户 @a:my.domain.net 尝试与用户 @thomiel:matríx.org 聊天,后者在尝试允许以下内容时收到“未授权”错误消息:
time="2021-03-12T15:36:37.840538570Z" level=info msg="Producing to topic 'DendriteOutputClientData'" func="github.com/matrix-org/dendrite/clientapi/producers.(*SyncAPIProducer).SendData" file="github.com/matrix-org/dendrite/clientapi/producers/syncapi.go:51" data_type=m.fully_read room_id="!zgF4scldfFsA7AGM:my.domain.net" user_id="@t:my.domain.net"
time="2021-03-12T15:36:37.860445777Z" level=info msg="received data from client API server" func="github.com/matrix-org/dendrite/syncapi/consumers.(*OutputClientDataConsumer).onMessage" file="github.com/matrix-org/dendrite/syncapi/consumers/clientapi.go:87" room_id="!zgF4scldfFsA7AGM:my.domain.net" type=m.fully_read
time="2021-03-12T15:37:22.582788411Z" level=warning msg="Outgoing request failed" func="github.com/matrix-org/gomatrixserverlib.(*Client).DoHTTPRequest" file="github.com/matrix-org/[email protected]/client.go:495" error="Get \"matrix:///_matrix/federation/v1/query/profile?user_id=%40thomiel%3A\": Invalid server name" out.req.ID=Qt8hIZAv7lTz out.req.method=GET out.req.uri="matrix:///_matrix/federation/v1/query/profile?user_id=%40thomiel%3A" req.id=JsCILPjJTfk9 req.method=GET req.path="/_matrix/client/r0/profile/@thomiel:"
time="2021-03-12T15:37:22.583677269Z" level=error msg="getProfile failed" func=github.com/matrix-org/dendrite/clientapi/routing.GetProfile file="github.com/matrix-org/dendrite/clientapi/routing/profile.go:53" error="Get \"matrix:///_matrix/federation/v1/query/profile?user_id=%40thomiel%3A\": Invalid server name" req.id=JsCILPjJTfk9 req.method=GET req.path="/_matrix/client/r0/profile/@thomiel:"
time="2021-03-12T15:37:26.555107474Z" level=warning msg="Error sending request to https://mat:8448/_matrix/federation/v1/query/profile?user_id=%40thomiel%3Amat: dial tcp: lookup mat on 192.168.178.1:53: no such host" func="github.com/matrix-org/gomatrixserverlib.(*federationTripper).RoundTrip" file="github.com/matrix-org/[email protected]/client.go:215" out.req.ID=CdP1f2Tsi6n9 out.req.method=GET out.req.uri="matrix://mat/_matrix/federation/v1/query/profile?user_id=%40thomiel%3Amat" req.id=IEjvHZmikkJs req.method=GET req.path="/_matrix/client/r0/profile/@thomiel:mat"
time="2021-03-12T15:37:26.563326409Z" level=warning msg="Error sending request to https://mat:8448/_matrix/federation/v1/query/profile?user_id=%40thomiel%3Amat: dial tcp: lookup mat on 192.168.178.1:53: no such host" func="github.com/matrix-org/gomatrixserverlib.(*federationTripper).RoundTrip" file="github.com/matrix-org/[email protected]/client.go:215" out.req.ID=CdP1f2Tsi6n9 out.req.method=GET out.req.uri="matrix://mat/_matrix/federation/v1/query/profile?user_id=%40thomiel%3Amat" req.id=IEjvHZmikkJs req.method=GET req.path="/_matrix/client/r0/profile/@thomiel:mat"
time="2021-03-12T15:37:26.564176777Z" level=warning msg="Outgoing request failed" func="github.com/matrix-org/gomatrixserverlib.(*Client).DoHTTPRequest" file="github.com/matrix-org/[email protected]/client.go:495" error="Get \"matrix://mat/_matrix/federation/v1/query/profile?user_id=%40thomiel%3Amat\": dial tcp: lookup mat on 192.168.178.1:53: no such host" out.req.ID=CdP1f2Tsi6n9 out.req.method=GET out.req.uri="matrix://mat/_matrix/federation/v1/query/profile?user_id=%40thomiel%3Amat" req.id=IEjvHZmikkJs req.method=GET req.path="/_matrix/client/r0/profile/@thomiel:mat"
time="2021-03-12T15:37:26.564959071Z" level=error msg="getProfile failed" func=github.com/matrix-org/dendrite/clientapi/routing.GetProfile file="github.com/matrix-org/dendrite/clientapi/routing/profile.go:53" error="Get \"matrix://mat/_matrix/federation/v1/query/profile?user_id=%40thomiel%3Amat\": dial tcp: lookup mat on 192.168.178.1:53: no such host" req.id=IEjvHZmikkJs req.method=GET req.path="/_matrix/client/r0/profile/@thomiel:mat"
... ...
time="2021-03-12T15:37:48.274943370Z" level=info msg=Responding func=github.com/matrix-org/dendrite/syncapi/routing.OnIncomingMessagesRequest file="github.com/matrix-org/dendrite/syncapi/routing/messages.go:198" backwards=true from=t1_73 limit=20 req.id=zV6MT6rqWrmQ req.method=GET req.path="/_matrix/client/r0/rooms/!LunTPWkeobaHy3AU:my.domain.net/messages" return_end=t0_0 return_start=t1_73 to=t0_0 user_id="@a:my.domain.net"
time="2021-03-12T15:37:48.312782568Z" level=info msg="Producing to topic 'DendriteOutputClientData'" func="github.com/matrix-org/dendrite/clientapi/producers.(*SyncAPIProducer).SendData" file="github.com/matrix-org/dendrite/clientapi/producers/syncapi.go:51" data_type=im.vector.setting.breadcrumbs room_id="" user_id="@a:my.domain.net"
time="2021-03-12T15:37:48.337201666Z" level=info msg="Producing to topic 'DendriteOutputClientData'" func="github.com/matrix-org/dendrite/clientapi/producers.(*SyncAPIProducer).SendData" file="github.com/matrix-org/dendrite/clientapi/producers/syncapi.go:51" data_type=m.fully_read room_id="!LunTPWkeobaHy3AU:my.domain.net" user_id="@a:my.domain.net"
time="2021-03-12T15:37:48.337304844Z" level=info msg="received data from client API server" func="github.com/matrix-org/dendrite/syncapi/consumers.(*OutputClientDataConsumer).onMessage" file="github.com/matrix-org/dendrite/syncapi/consumers/clientapi.go:87" room_id="" type=im.vector.setting.breadcrumbs
time="2021-03-12T15:37:48.397000891Z" level=info msg="received data from client API server" func="github.com/matrix-org/dendrite/syncapi/consumers.(*OutputClientDataConsumer).onMessage" file="github.com/matrix-org/dendrite/syncapi/consumers/clientapi.go:87" room_id="!LunTPWkeobaHy3AU:my.domain.net" type=m.fully_read
time="2021-03-12T15:37:48.469433547Z" level=info msg="Fetched 0 events locally" func="github.com/matrix-org/dendrite/syncapi/routing.(*messagesReq).retrieveEvents" file="github.com/matrix-org/dendrite/syncapi/routing/messages.go:259" end=t0_0 req.id=7kQynzHEMUXd req.method=GET req.path="/_matrix/client/r0/rooms/!LunTPWkeobaHy3AU:my.domain.net/messages" start=t0_0 user_id="@a:my.domain.net"
time="2021-03-12T15:37:48.472270380Z" level=info msg=Responding func=github.com/matrix-org/dendrite/syncapi/routing.OnIncomingMessagesRequest file="github.com/matrix-org/dendrite/syncapi/routing/messages.go:198" backwards=true from=t0_0 limit=20 req.id=7kQynzHEMUXd req.method=GET req.path="/_matrix/client/r0/rooms/!LunTPWkeobaHy3AU:my.domain.net/messages" return_end=t0_0 return_start=t0_0 to=t0_0 user_id="@a:my.domain.net"
time="2021-03-12T15:37:51.289533510Z" level=info msg="Producing to topic 'DendriteOutputClientData'" func="github.com/matrix-org/dendrite/clientapi/producers.(*SyncAPIProducer).SendData" file="github.com/matrix-org/dendrite/clientapi/producers/syncapi.go:51" data_type=m.fully_read room_id="!LunTPWkeobaHy3AU:my.domain.net" user_id="@a:my.domain.net"
time="2021-03-12T15:37:51.309391237Z" level=info msg="received data from client API server" func="github.com/matrix-org/dendrite/syncapi/consumers.(*OutputClientDataConsumer).onMessage" file="github.com/matrix-org/dendrite/syncapi/consumers/clientapi.go:87" room_id="!LunTPWkeobaHy3AU:my.domain.net" type=m.fully_read
time="2021-03-12T15:38:13.489337025Z" level=info msg=PerformDeviceDeletion func="github.com/matrix-org/dendrite/userapi/internal.(*UserInternalAPI).PerformDeviceDeletion" file="github.com/matrix-org/dendrite/userapi/internal/api.go:127" devices="[qnTWgh6Y]" req.id=KnzjQXxBfK3h req.method=POST req.path=/_matrix/client/r0/logout user_id="@t:my.domain.net"
time="2021-03-12T15:38:13.558120970Z" level=info msg="Sending device list update message to [\"my.domain.net\"]" func="github.com/matrix-org/dendrite/federationsender/consumers.(*KeyChangeConsumer).onMessage" file="github.com/matrix-org/dendrite/federationsender/consumers/keychange.go:132"
time="2021-03-12T15:38:13.582578974Z" level=info msg="Produced to key change topic 'DendriteOutputKeyChangeEvent'" func="github.com/matrix-org/dendrite/keyserver/producers.(*KeyChange).ProduceKeyChanges" file="github.com/matrix-org/dendrite/keyserver/producers/keychange.go:72" num_key_changes=1 user_id="@t:my.domain.net"
time="2021-03-12T15:40:22.339661581Z" level=info msg="Fetching 1 key(s)" func="github.com/matrix-org/dendrite/signingkeyserver/internal.(*ServerKeyAPI).handleFetcherKeys" file="github.com/matrix-org/dendrite/signingkeyserver/internal/api.go:208" fetcher_name="perspective server matrix.org"
time="2021-03-12T15:40:22.536747076Z" level=info msg="Updated 2 of 2 key(s) in database (0 keys remaining)" func="github.com/matrix-org/dendrite/signingkeyserver/internal.(*ServerKeyAPI).handleFetcherKeys" file="github.com/matrix-org/dendrite/signingkeyserver/internal/api.go:262" fetcher_name="perspective server matrix.org"
time="2021-03-12T15:40:22.553190363Z" level=info msg="Invalid request signature" func=github.com/matrix-org/gomatrixserverlib.VerifyHTTPRequest file="github.com/matrix-org/[email protected]/request.go:239" error="Bad signature from \"matrix.org\" with ID \"ed25519:a_RXGa\"" req.id=n2iqmJBtoe2x req.method=GET req.path="/_matrix/federation/v1/make_join/!LunTPWkeobaHy3AU:my.domain.net/@thomiel:matrix.org"
这里似乎有两种类型的消息相关:最后一条条目带有“无效请求签名”和 2 x“无效服务器名称”@time="2021-03-12T15:37:22",可能在自动完成过程中发生。
答案1
这是最终使其工作的配置:
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
DocumentRoot /var/www/nextcloud
CustomLog /var/log/apache2/nc-access.log combined
ErrorLog /var/log/apache2/nc-error.log
SSLEngine on
ServerName my.domain.net
SSLCertificateFile /etc/letsencrypt/live/my.domain.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my.domain.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLProxyEngine On
ProxyPreserveHost On
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
AllowEncodedSlashes NoDecode
<Location /_matrix>
ProxyPass http://127.0.0.1:8008/_matrix retry=0 timeout=600 nocanon
ProxyPassReverse http://127.0.0.1:8008/_matrix
</Location>
<Location /.well-known/matrix/server>
ErrorDocument 200 '{ "m.server": "my.domain.net:443" }'
RewriteEngine On
RewriteRule .* - [R=200]
</Location>
<Location /.well-known/matrix/client>
ErrorDocument 200 '{ "m.homeserver": { "base_url": "https://my.domain.net" } }'
RewriteEngine On
RewriteRule .* - [R=200]
</Location>
</VirtualHost>
<VirtualHost *:8448>
DocumentRoot /var/www/nextcloud
CustomLog /var/log/apache2/nc-access.log combined
ErrorLog /var/log/apache2/nc-error.log
SSLEngine on
ServerName my.domain.net
SSLCertificateFile /etc/letsencrypt/live/my.domain.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my.domain.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
AllowEncodedSlashes NoDecode
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
ProxyPreserveHost On
SSLProxyEngine On
<Location /_matrix>
ProxyPass http://127.0.0.1:8008/_matrix retry=0 timeout=600 nocanon
ProxyPassReverse http://127.0.0.1:8008/_matrix
</Location>
</VirtualHost>
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
LimitRequestBody 0
SSLRenegBufferSize 10486000
</Directory>
</IfModule>
最值得注意的是和 的nocanon
选项。我还必须删除整个数据库 (*.db),因为 Dendrite 在某些时候变得偏执,并拒绝所有传入请求,因为由于先前的错误配置,这些请求来自冒名顶替者。和其他聊天室的社区支持帮助我缩小了问题范围。ProxyPass
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
#dendrite:matrix.org
我终于被指向https://github.com/matrix-org/synapse/blob/develop/docs/reverse_proxy.md#apache因为 Synapse 网络服务器配置与 Dendrite 非常相似。