[jadmin] Ejabberd 2: howto serve a file and httpbind

Badlop badlop at gmail.com
Mon Nov 26 03:17:43 CST 2007


2007/11/26, Unai Rodriguez <me at u-journal.org>:
> Dear all,
>
> I have installed Ejabberd 2, getting the code from subversion
> (http://svn.process-one.net/ejabberd/trunk).

I think you got ejabberd SVN, not ejabberd 2 :)


> a) Enable HTTP-BIND

This tutorial includes some parts interesting for you:
http://www.ejabberd.im/jwchat-localserver


> b) Make ejabberd serve the contents of a text file. Let's say:
>
> http://myejabberd.com:5280/test.xml
>
> Shows the contents of test.xml.
>
> How can I do this?

Not possible exactly that, but quite close:

If you have
  /var/lib/www/test.xml

you can serve it in
  http://myejabberd.com:5280/web/test.xml

with this config:
{hosts, ["myejabberd.com"]}.
{listen, [
	...
	{5280, ejabberd_http, [
		{request_handlers, [
			{["web"], mod_http_fileserver}
		]}
	]}
]}.

{modules, [
	...
	{mod_http_fileserver, [
		{docroot, "/var/lib/www"},
		{accesslog, "/var/log/ejabberd/webaccess.log"}
	]}
]}.


More information about the JAdmin mailing list