关于为矩阵突触设置sydent的问题
Question regarding setting up sydent for matrix synapse
我有一个关于设置身份服务器的问题。
我已经在一台服务器上的 nginx 反向代理后面设置了矩阵突触
现在我想在另一台服务器上配置 sydent。
在矩阵服务器上我做了以下操作:
我将 homeserver.yaml 文件放入:
trusted_third_party_id_servers:
- [FQDN of my identity server]
对于我的 nginx 反向代理:
location / {
try_files $uri $uri/ =404;
}
location /_matrix/identity {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://[FQDN of my identity server]:8090/_matrix/identity;
}
location /_matrix {
proxy_pass http://localhost:8008/_matrix;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
我还编辑了元素的配置文件:
"m.identity_server": {
"base_url": "http://[FQDN of my identity server]",
}
现在我的身份服务器上的 sydent.conf 文件,我不太确定要放什么。
现在看起来像这样:
[DEFAULT]
server.name =
log.path =
log.level = INFO
pidfile.path = sydent.pid
terms.path =
address_lookup_limit = 10000
enable_v1_associations = true
delete_tokens_on_bind = true
db.file = sydent.db
clientapi.http.bind_address = ::
clientapi.http.port = 8090
internalapi.http.bind_address = ::1
internalapi.http.port =
replication.https.certfile =
replication.https.cacert =
replication.https.bind_address = ::
replication.https.port = 4434
obey_x_forwarded_for = False
federation.verifycerts = True
verify_response_template =
client_http_base =
email.template = res/email.template
email.invite_template = res/invite.template
email.from = Sydent Validation <noreply@{hostname}>
email.subject = Your Validation Token
email.invite.subject = %(sender_display_name)s has invited you to chat
email.smtphost = localhost
email.smtpport = 25
email.smtpusername =
email.smtppassword =
email.hostname =
email.tlsmode = 0
email.third_party_invite_username_obfuscate_characters = 3
email.third_party_invite_domain_obfuscate_characters = 3
bodytemplate = Your code is {token}
username =
password =
ed25519.signingkey =
[general]
server.name = [FQDN of my identity server]
[db]
[http]
[email]
email.tlsmode = 0
email.template = res/email.template
email.smtppassword =
email.smtphost = localhost
email.default_web_client_location = https://app.element.io
email.from = Sydent Validation <noreply@{hostname}>
email.invite_template = res/invite.template
email.invite.subject = %(sender_display_name)s has invited you to chat
email.smtpusername =
email.smtpport = 25
email.subject = Your Validation Token
email.hostname =
email.third_party_invite_domain_obfuscate_characters = 3
email.third_party_invite_username_obfuscate_characters = 3
[sms]
[crypto]
ed25519.signingkey = [key]
当我在身份服务器上启动 sydent 时,我能够连接到
它(通过 8090 端口)从矩阵服务器。
所以这不应该是一个
关于关闭端口的问题,而是我配置错误
两台服务器之一?
如果是这样,是不是我配置有误或忘记做什么?
在你的 Nginx 反向代理中,你应该写:
proxy_pass http://localhost:8090/_matrix/identity;
因为没有网络服务器为您的 FQDN 的端口 8090 提供服务。即使有,您也确实想在本地请求身份服务器。
我有一个关于设置身份服务器的问题。 我已经在一台服务器上的 nginx 反向代理后面设置了矩阵突触 现在我想在另一台服务器上配置 sydent。
在矩阵服务器上我做了以下操作:
我将 homeserver.yaml 文件放入:
trusted_third_party_id_servers:
- [FQDN of my identity server]
对于我的 nginx 反向代理:
location / {
try_files $uri $uri/ =404;
}
location /_matrix/identity {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://[FQDN of my identity server]:8090/_matrix/identity;
}
location /_matrix {
proxy_pass http://localhost:8008/_matrix;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
我还编辑了元素的配置文件:
"m.identity_server": {
"base_url": "http://[FQDN of my identity server]",
}
现在我的身份服务器上的 sydent.conf 文件,我不太确定要放什么。
现在看起来像这样:
[DEFAULT]
server.name =
log.path =
log.level = INFO
pidfile.path = sydent.pid
terms.path =
address_lookup_limit = 10000
enable_v1_associations = true
delete_tokens_on_bind = true
db.file = sydent.db
clientapi.http.bind_address = ::
clientapi.http.port = 8090
internalapi.http.bind_address = ::1
internalapi.http.port =
replication.https.certfile =
replication.https.cacert =
replication.https.bind_address = ::
replication.https.port = 4434
obey_x_forwarded_for = False
federation.verifycerts = True
verify_response_template =
client_http_base =
email.template = res/email.template
email.invite_template = res/invite.template
email.from = Sydent Validation <noreply@{hostname}>
email.subject = Your Validation Token
email.invite.subject = %(sender_display_name)s has invited you to chat
email.smtphost = localhost
email.smtpport = 25
email.smtpusername =
email.smtppassword =
email.hostname =
email.tlsmode = 0
email.third_party_invite_username_obfuscate_characters = 3
email.third_party_invite_domain_obfuscate_characters = 3
bodytemplate = Your code is {token}
username =
password =
ed25519.signingkey =
[general]
server.name = [FQDN of my identity server]
[db]
[http]
[email]
email.tlsmode = 0
email.template = res/email.template
email.smtppassword =
email.smtphost = localhost
email.default_web_client_location = https://app.element.io
email.from = Sydent Validation <noreply@{hostname}>
email.invite_template = res/invite.template
email.invite.subject = %(sender_display_name)s has invited you to chat
email.smtpusername =
email.smtpport = 25
email.subject = Your Validation Token
email.hostname =
email.third_party_invite_domain_obfuscate_characters = 3
email.third_party_invite_username_obfuscate_characters = 3
[sms]
[crypto]
ed25519.signingkey = [key]
当我在身份服务器上启动 sydent 时,我能够连接到 它(通过 8090 端口)从矩阵服务器。 所以这不应该是一个 关于关闭端口的问题,而是我配置错误 两台服务器之一?
如果是这样,是不是我配置有误或忘记做什么?
在你的 Nginx 反向代理中,你应该写:
proxy_pass http://localhost:8090/_matrix/identity;
因为没有网络服务器为您的 FQDN 的端口 8090 提供服务。即使有,您也确实想在本地请求身份服务器。