質問

I'm trying to connect converesejs example to an openfire server which is istalled on my localhost, but the connection can not be estableshed (I don't know why). However I can connect to openfire server with Psi. I think that the problem is with http-bind...

In conversejs example there is such code that should be editied by me.

<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>

I found some information that Apache config (httpd.conf) must be edited. So I uncommented proxy_module and proxy_http_module.

And I set up such params in 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/

But this did't help. When I'm trying to login to the server using conversejs example page it stays in status "Connecting"...

Thanks for your help!

役に立ちましたか?

解決

You need to configure OpenFire to support BOSH (Bidirectional-streams Over Synchronous HTTP).

Log in to the admin console, then go to Server-> Server Settings -> HTTP Binding.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top