0

我安装了 Openfire,根据糖果文档中的文档设置所有内容。

在 Jboss 和 Openfire 前面设置 apache 服务器。

编辑 etc/httpd/conf/httpd.conf 文件:

ProxyRequests Off

ProxyPass /http-bind http://ip_of_machine:7070/http-bind
ProxyPassReverse /http-bind http://ip_of_machine:7070/http-bind

ProxyPass /myjavawebapp http://ip_of_machine:8080/myjavawebapp
ProxyPassReverse /myjavawebapp http://ip_of_machine:8080/myjavawebapp

/usr/sbin/setsebool httpd_can_network_connect true

在此之后,如果我浏览浏览器

http://ip_of_machine/myjavawebapp

我看到我的应用程序,如果我去

http://ip_of_machine/http-bind/

我得到这个页面

 Openfire HTTP Binding Service

我的糖果初始化代码是这样的

     Candy.init('http-bind/', {
                            core: { debug: false },
                            view: { resources: '../res/' }
                    });

                    Candy.Core.connect();

我不知道如何与我的用户/通行证连接到 openfire。我尝试了不同的用户/密码组合,我尝试使用不同的 Candy.Core.connect 配置,但没有运气。

我可以从 pidgin 和任何其他客户端连接到 OpenFire,但为此我使用端口 5222

当我在 Candy.Core.connect 中输入一些值(只有一个参数)时,我只被要求输入用户名,我输入它,然后它看起来像对 http-bind 的无限循环请求,每次都返回相同事物

 Openfire HTTP Binding Service

我不确定我是否错过了 OpenFire 的某些设置,或者 Apache 的设置有问题,或者 javascript 代码有问题,或者其他什么。

任何想法,建议?

4

1 回答 1

0

找到解决方案。我的 apache 设置和 javascript 代码有错误

首先我像这样设置apache conf

ProxyPass /myjavawebapp http://ip_of_machine:8080/myjavawebapp
ProxyPassReverse /myjavawebapp http://ip_of_machine:8080/myjavawebapp

AddDefaultCharset UTF-8
Options +MultiViews
RewriteEngine On
RewriteRule http-bind/ http://ip_of_machine:7070/http-bind/ [P]

在此之后我修改了这样的javascript糖果代码

Candy.init('/http-bind/', {
            core: { debug: true ,autojoin: ['muc@conference.ip_of_machine']}
            ,
            view: { resources: '../res/' }
  });

Candy.Core.connect();

我使用用户名作为

myusername@ip_of_machine

和我的用户的密码,一切正常:)

于 2013-01-21T11:38:14.803 回答