Serving crossdomain.xml with mod_http_fileserver

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
aaron's picture

I'm attempting to set up a crossdomain.xml to be served at http://example.com:5280/crossdomain.xml. I currently am using:

{mod_http_fileserver, [{docroot, "/var/www"},
                  {content_types, [{".xml", "text/xml"}]}]},

and

  {5280, ejabberd_http, [
                        web_admin,
                         {request_handlers,     [{["xmpp-httpbind"],
                                                 mod_http_bind},
                                                {[], mod_http_fileserver}
                                                ]}
                        ]}

per http://p2p.wrox.com/book-professional-xmpp-programming-javascript-jquery...

However, this causes the xml to download from firefox, rather than being displayed in the browser as does http://bosh.metajack.im:5280/crossdomain.xml -- I checked that file, and noticed it's type is "application/xml". I changed the content type to that, but it still didn't work.

Any ideas? As a related note, this configuration also disabled the web_admin functionality.

Thanks,
Aaron

(Cross-posted at http://www.ejabberd.im/node/3982.)

Comments

Tried that too, and didn't

franskuipers's picture

Tried that too, and didn't get it to work.

Today I found the ubuntu apt repositiory on http://jabber.fsinf.at/en/features/apt.

Add "deb http://apt.fsinf.at karmic jabber" to /etc/apt/sources.list.d/jabber.list
sudo aptitude update
sudo aptitude full-upgrade -> installs ejabberd 2.1.2 with build-in delivery of crossdomain.xml

Removed mod_http_fileserver from ejabberd.cfg

in this version there is a ejabberd-xmlrpc for remote execution of ejabberdctl commands,
documentation is in /usr/share/doc/ejabberd-mod-xmlrpc/README.txt.gz

Is web-admin not dependent on /http-bind/ instead of /xmpp-httpbind/? Other possibility is the fileserver want to serve the file /admin?

I'm trying to use this to use

aaron's picture

I'm trying to use this to use flXHR with Strophe. xmlrpc will be good for remote authentication/registration/etc, but I don't think it will solve the issue of cross-domain policy that flXHR should fix, unless I misunderstand.

Thanks,
Aaron

Aaron Winborn
Drupal Multimedia (my book, available now!)
AaronWinborn.com
Advomatic

I wrote down my configuration

franskuipers's picture

I wrote down my configuration here: http://drupal.org/node/761042

I needed to add some attachments, is easier in an issue.

Thanks, Frans

On a side note: I discovered

franskuipers's picture

On a side note: I discovered this morning ejabberd 2.1.2 is NOT serving crossdomain.xml :-(

Solved this one: I was using

aaron's picture

Solved this one: I was using ejabberd 2.0.0, but the content_types option wasn't added until 2.1.0 according to https://support.process-one.net/browse/EJAB-975. Not sure about the issue w/ 2.1.2. What's your cfg file look like, Frans?

Aaron Winborn
Drupal Multimedia (my book, available now!)
AaronWinborn.com
Advomatic

FYI, I filed an issue for

aaron's picture

FYI, I filed an issue for that at https://support.process-one.net/browse/EJAB-1214 to make it slightly easier to configure.

Aaron Winborn
Drupal Multimedia (my book, available now!)
AaronWinborn.com
Advomatic

XMPP

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week