2012-08-02 1 views
0

난로와 함께 로컬 오픈 파이어 서버에 연결하는 데 문제가 있습니다. 이 코드를 사용하면 연결 상태가 항상 표시됩니다. 아무도 문제가 될 수있는 곳을 말해 줄 수 있습니까?난로와 함께 열린 화재에 연결할 수 없습니다.

function XMPPconnect() { 
    var conn = new Strophe.Connection("http://127.0.0.1:5222/http-bind"); 
    conn.connect("my_username", "my_password", connect); 
} 

function connect(status) { 
    console.log(status); 
    if (status === Strophe.Status.CONNECTED) { 
     console.log("connected"); 
    } 
} 

나는 다른 포트로 시도해 보았지만 나에게 적합하지 않습니다. 저는 새로운 strophe 버전 1.0.2와 등록 된 사용자를 사용하고 있습니다.

답변

1

마침내 문제가 발견되었으므로 모든 사람들이 염두에두고 게시 해 드리겠습니다. 문제는 로컬 호스트에 Apache 서버를 설치하지 않았기 때문입니다. 그 사본을하려면 그 후 httpd.conf 파일

ProxyRequests Off 
ProxyPass /http-bind http://localhost:7070/http-bind/ 
ProxyPassReverse /http-bind http://localhost:7070/http-bind/ 
ProxyPass /http-binds http://localhost:7443/http-bind/ 
ProxyPassReverse /http-binds http://localhost:7443/http-bind/ 

의 끝이 라인은 당신이

를 사용하여 연결 할 수 있어야한다이 두 단계 후이 두 줄

LoadModule proxy_module modules/mod_proxy.so 
LoadModule proxy_http_module modules/mod_proxy_http.so 

주석을 제거 할 필요가

http://localhost/http-bind 

(BOSH_SERVICE)

+0

http : // localhost : 7070/http-bind /를 사용하여 연결 하시겠습니까? –