mod_http_fileserver
Posted: 11 March 2007 04:40 PM   [ Ignore ]
Administrator
Avatar
RankRankRankRank
Total Posts:  497
Joined  2006-11-12

We have released recently in ejabberd-modules Subversion repository a new contribution called mod_http_fileserver.

This module is a good example of how the new HTTP plugin API. It can serve as a good illustration of what can be achieved by developers using this API.

To try this new module:
- be carefull: The whole thing is still in beta.
- download and compile ejabberd development version from SVN as usual:

https://svn.process-one.net/ejabberd/trunk/ 

- download and compile mod_http_fileserver module from SVN:

https://svn.process-one.net/ejabberd-modules/mod_http_fileserver/trunk 

Once you have done that, you can add the new module to your configuration file.
Here is a sample ejabberd.cfg options, assuming that files are to be accessed
under “http://server:5280/pub/archive/” and that the filesystem directory to export is “/var/www”:

{listen,
   ...
   
{5280ejabberd_http,    [http_pollweb_admin,
                    
{request_handlers[{["pub""archive"]mod_http_fileserver}]}]}
   
...
   
]}

...
  
{modules,
   
[
    
...
    
{mod_http_fileserver[{docroot"/var/www"}]},
    ...
   
]} 

The code is the work of Massimiliano Mirra.

Your feedback is welcome !

Profile
 
 
Posted: 21 March 2007 05:44 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  497
Joined  2006-11-12

For your information, Muckl (http://muckl.org) or JWChat (http://www.jwchat.org) work like a charm with this new module.

Profile
 
 
Posted: 24 May 2007 11:52 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  27
Joined  2007-04-11
Mickaël Rémond - 21 March 2007 05:44 PM

For your information, Muckl (http://muckl.org) or JWChat (http://www.jwchat.org) work like a charm with this new module.

As I understand jwchat work with mod_http_bind module, but how it related with mod_http_fileserver?

Profile
 
 
Posted: 30 May 2007 01:41 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  497
Joined  2006-11-12

When using JWChat or Muckl you need to serve static HTML and Javascript file. mod_http_fileserver can serve them.

Profile
 
 
Posted: 30 May 2007 03:10 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  27
Joined  2007-04-11
Mickaël Rémond - 30 May 2007 01:41 PM

When using JWChat or Muckl you need to serve static HTML and Javascript file. mod_http_fileserver can serve them.

1) where mod_http_fileserver can get httpd_util:to_lower?

2) why mod_http_fileserver can’t use with virtual hosts? even one from hosts is real…

Profile
 
 
Posted: 30 May 2007 03:44 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  497
Joined  2006-11-12

httpd_util:to_lower is in Erlang standard distribution (Inets)

mod_http_fileserver cannot use virtual hosts because this is a feature that has not yet been implemented, but we are taking this message as a feature request.

Thank you !

Profile
 
 
Posted: 30 May 2007 03:56 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  27
Joined  2007-04-11
Mickaël Rémond - 30 May 2007 03:44 PM

httpd_util:to_lower is in Erlang standard distribution (Inets)

I found
\erl5.5.4\lib\inets-4.7.11\ebin\http_util.beam
\erl5.5.4\lib\inets-4.7.11\src\http_util.erl

in my erl 5.5.4 and not found in ejabberd1.1.3 windows installation, that is why
mod_http_fileserver not work, after that I placed these files in lib\ejabberd\ebin\
and it works.

Profile
 
 
Posted: 20 March 2010 06:26 PM   [ Ignore ]   [ # 7 ]
Newbie
Rank
Total Posts:  1
Joined  2010-03-20

Hi !

I install ejabberd 2.1.3 on FreeBSD 7.3 i386 with jwchat and mod_http_fileserver. It works with English usernames but won’t work with Chinese user names. I checked in the database, the Chinese names are in the table users.  In the ejabberd.log, it says Failed authentication for ^DKD@myhost.com.
This ^DKD is not n UTF-8 code. I think this is the problem.
When I use an English name and input wrong password, it shows the right username .(JavaScript must be enabled to view this email address) failed authentication.

When I use other client. It is ok. So it is jwchat’s problem?

Please help.

Profile
 
 
Posted: 10 April 2010 03:40 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  1
Joined  2010-04-10

Nice Topic. Thanks guys.

Profile
 
 
Posted: 05 July 2010 09:11 AM   [ Ignore ]   [ # 9 ]
Newbie
Rank
Total Posts:  2
Joined  2010-07-02
Victor Y. Sklyar - 30 May 2007 03:56 PM
Mickaël Rémond - 30 May 2007 03:44 PM

httpd_util:to_lower is in Erlang standard distribution (Inets)

I found
\erl5.5.4\lib\inets-4.7.11\ebin\http_util.beam
\erl5.5.4\lib\inets-4.7.11\src\http_util.erl

in my erl 5.5.4 and not found in ejabberd1.1.3 windows installation, that is why
mod_http_fileserver not work, after that I placed these files in lib\ejabberd\ebin\
and it works.

What a surprise !!!
I solved my problem from your post.
I appreciate your help buddy.

http://www.eurodebt.com/

Profile