我尝试在Ubuntu 12(Linode最新版本)上使用内部Ejabberd Web服务器设置Strophe与Ejabberd,并用其提供聊天服务。
测试URL (http-bind 和 admin) 都可用。
JWChat 可用。
Strophe 抛出错误:
In Strophe:
RECV: <body xmlns='http://jabber.org/protocol/httpbind' type='terminate' condition='internal-server-error'>BOSH module not started</body>
In ejabberd.log:
E(<0.468.0>:ejabberd_http_bind:1236) :
You are trying to use BOSH (HTTP Bind) in host "admin", but the module mod_http_bind is not started in that host.
Configure your BOSH client to connect to the correct host, or add your desired host`
安装过程很直接(虽然花了相当一段时间才弄清楚):
- 使用sudo apt-get安装
- 在sudo下运行
- 使用内部服务器,避免与代理冲突或设置PunJab。
- 在ejabberd.cfg中进行更改。
ejabberd.cfg的更改:
%% In listening ports, amended the following lines:
{ request_handlers, [
{["pub"], mod_http_fileserver},
{["http-bind"], mod_http_bind}
]},
%% In modules, added the following:
{ mod_http_fileserver, [
{docroot, "/var/lib/ejabberd/www"},
{accesslog, "/var/log/ejabberd/access.log"}
]},
{mod_http_bind, []},
非常感谢您的帮助。