It is difficult to find out what the best way is to serve the crossdomain.xml when you really want the ejabberd server on a different domain from your drupal server. Aaron (http://groups.drupal.org/node/59673) as well as me have tried it with the ejabberd mod_http_fileserver module without success.
I think I have an working solution now. Would like to have conformation it is working, then we can add it to the documentation here: http://groups.drupal.org/node/59163
The configuration on the ejabberd server (Ubuntu Karmic 9.10 with Apache):
- Enabled proxy_http on the server.
- Added proxy for xmpp.myjabberserver.com:5222/http-bind/ for this virtual host. See attached xmpp.myjabberserver.com_.txt)
- Created in the virtualhost-root /var/www/ejabberd/crossdomain.xml. (See attached crossdomain.xml_.txt)
- Restarted Apache. http://xmpp.myjabberserver.com/http-bind/ should show a message from the ejabberd server and http://xmpp.myjabberserver.com/crossdomain.xml should show the xml
The configuration of the Drupal DXMPP module on http://xmpp.sandbox.drupalkata.com/admin/settings/dxmpp:
- XMPP Server domain: xmpp.myjabberserver.com
- XMPP Bosh URL: http://xmpp.myjabberserver.com/http-bind/
- Use flXHR: selected
This configuration seems to make flXHR.js and Strophe (BOSH) both happy. See the attached ejabberd.log_.txt for the communication of a page refresh and one cycle after 1 minute wait time. The attached xmpp_access.log_.txt show the delivery of crossdomain.xml and POST records to /http-bind/.
Don't know if this is the most elegant solution, but it seems to work.
Comments
Comment #1
aaron CreditAttribution: aaron commentedthis was fixed for ejabberd at https://support.process-one.net/browse/EJAB-1214 -- you can install ejabberd version http://www.ejabberd.im/ejabberd-2.1.4 to fix. this should work as well, though, from the looks of it.
tagging this to add to documentation.