0
votes

I am tryting to setup BOSH with openfire , after enabling it , i have set the proxy for apache

as follows

<VirtualHost XX.XX.XXX.XXX:80>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    DocumentRoot /home/mydomainname/public_html
    ServerAdmin [email protected]
    UseCanonicalName Off

    ProxyRequests Off

     <Proxy *>
      Order deny,allow
      Allow from all
    </Proxy>

    ProxyPass /http-bind/ http://www.mydomain.com:7070/http-bind/
    ProxyPassReverse /http-bind/ http://www.mydomain.com:7070/http-bind/


    <IfModule mod_suphp.c>
        suPHP_UserGroup mydomainname mydomainname
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup mydomainname mydomainname
    </IfModule>

    ScriptAlias /cgi-bin/ /home/mydomainname/public_html/cgi-bin/


</VirtualHost>

But when i set the BOSH connection to /http-bind/ or http://mydomain.com/http-bind

it returns 404 ERROR while sending XMPP BOSH request using strophe.js

do i need to unable anything in apache2 ?

my settings is under /etc/httpd/conf/httpd.conf

dig www.mydomain.com

    ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.5 <<>> www.mydomain.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4697
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

    ;; QUESTION SECTION:
    ;www.mydomain.com.      IN  A

    ;; ANSWER SECTION:
    www.mydomain.com.   14400   IN  CNAME   mydomain.com.
    mydomain.com.       14400   IN  A   XX.XX.XXX.XXX

    ;; Query time: 61 msec
    ;; SERVER: 8.8.8.8#53(8.8.8.8)
    ;; WHEN: Wed Dec  5 02:2

    0:20 2012
   ;; MSG SIZE  rcvd: 66

getent hosts www.mydomain.com

XX.XX.XXX.XXX   mydomain.com www.mydomain.com

curl http://www.mydomain.com:7070/http-bind/

HTTP ERROR 400

Problem accessing /http-bind/. Reason:

    Bad Request
Powered by Jetty://
1
First: what are you expecting to get back when you get the 404? Things to check in order: what does dig www.mydomain.com return when run on your server? what does getent hosts www.mydomain.com return when run on your server? what does curl http://www.mydomain.com:7070/http-bind/ return when run on your server? The answers to these questions will help narrow down where the problem is.Ladadadada
@Ladadadada aplz see the updateHunt
That's a 400 error rather than a 404 but it's probably because we didn't supply appropriate POST parameters or something similar. It does let us know at least that the request is making it as far as Jetty. Have a look through your Jetty logs and see if there's anything useful in there.Ladadadada

1 Answers

0
votes

To be able to use ProxyPass and ProxyPassReverse, you need to enable Apache mod_proxy first.

host# a2enable mod_proxy
host# /etc/init.d/apache2 restart