【问题标题】:ConverseJS and OpenFireConverseJS 和 OpenFire
【发布时间】:2014-06-21 11:01:14
【问题描述】:

我正在尝试将 converesejs 示例连接到安装在我的本地主机上的 openfire 服务器,但无法建立连接(我不知道为什么)。但是我可以使用 Psi 连接到 openfire 服务器。我认为问题在于 http-bind...

在 conversejs 示例中有这样的代码应该由我编辑。

<script>
require(['converse'], function (converse) {
    converse.initialize({
        allow_otr: true,
        auto_list_rooms: false,
        auto_subscribe: false,
        bosh_service_url: 'http://localhost:7070/http-bind', // my connection manager of an openfire 
        debug: true ,
        hide_muc_server: false,
        i18n: locales['en'], // Refer to ./locale/locales.js to see which locales are supported
        prebind: false,
        show_controlbox_by_default: true,
        xhr_user_search: false,
    });
});</script>

我发现了一些必须编辑 Apache config (httpd.conf) 的信息。所以我取消了 proxy_module 和 proxy_http_module 的注释。

我在 httpd.conf 中设置了这样的参数:

ProxyRequests Off
ProxyPass /http-bind http://127.0.0.1:7070/http-bind/
ProxyPassReverse /http-bind http://127.0.0.1:7070/http-bind/

但这没有帮助。当我尝试使用 conversejs 示例页面登录服务器时,它保持“正在连接”状态...

感谢您的帮助!

【问题讨论】:

  • 我正试图让 converseJS 在一个应用程序上工作,我自己在服务器上使用 openfire。它对你怎么样?我应该继续吗?

标签: apache xmpp openfire ejabberd converse.js


【解决方案1】:

您需要配置 OpenFire 以支持 BOSH(同步 HTTP 上的双向流)。

登录管理控制台,然后进入服务器-> 服务器设置-> HTTP 绑定。

【讨论】:

猜你喜欢
  • 2015-05-19
  • 2016-09-01
  • 2018-03-22
  • 1970-01-01
  • 2021-09-03
  • 1970-01-01
  • 1970-01-01
  • 2018-09-05
  • 2014-06-16
相关资源
最近更新 更多