【发布时间】:2020-03-07 14:17:50
【问题描述】:
在 ejabberd 18.01-2 中,使用 apt 安装在 lxc 容器 Ubuntu 18.04 Bionic LTS 中,我正在尝试设置 mod_http_upload。
在listen部分,我有
listen:
-
port: 5444
module: ejabberd_http
tls: true
request_handlers:
"/upload": mod_http_upload
在配置文件中,注释的端口是5444,但是在当前文档中,它是5443,所以我不确定哪个是正确的。
在模块部分,我有
modules:
mod_http_upload:
host: "upload.ejabberd.forumanalogue.fr"
max_size: infinity
thumbnail: true
put_url: "https://ejabberd.forumanalogue.fr:5444/upload"
docroot: "/ejabberd/upload"
当我启动服务时,我可以在日志中看到一条奇怪的消息
2019-11-11 21:02:35.287 [warning] <0.367.0>@ejabberd_pkix:handle_call:255 No certificate found matching 'upload.ejabberd.forumanalogue.fr': strictly configured clients or servers will reject connections with this host; obtain a certificate for this (sub)domain from any trusted CA such as Let's Encrypt (www.letsencrypt.org)
这很奇怪,因为我有一个签名的通配符证书。
certfiles:
- "/etc/letsencrypt/live/forumanalogue.fr/*.pem"
我可以通过我的客户 (Gajim) 看到该服务,但是当我尝试将文件发送到另一个本地帐户时,我收到错误 Access denied by service policy,请参阅完整日志:
<iq xml:lang='en' to='foo@forumanalogue.fr/gajim.HCLJ4BZI' from='upload.ejabberd.forumanalogue.fr' type='error' id='1dd35274-90e9-4b3b-9608-0fab59afe34e'>
<request xmlns='urn:xmpp:http:upload'>
<filename>a.out</filename>
<size>27232</size>
<content-type>application/octet-stream</content-type>
</request>
<error code='403' type='auth'>
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Access denied by service policy</text>
</error>
</iq>
我必须启用调试日志才能看到一些东西。这很冗长,但我认为与客户端消息无关的相关部分是
2019-11-11 20:53:08.329 [debug] <0.501.0>@mod_http_upload:process_slot_request:544 Denying HTTP upload slot request from foo@forumanalogue.fr/gajim.HCLJ4BZI
感谢您的帮助。
【问题讨论】: