mod_http_fileserver
Posted: 11 March 2007 04:40 PM   [ Ignore ]
Administrator
Avatar
RankRankRankRank
Total Posts:  128
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,
   ...
   
{5280, ejabberd_http,    [http_poll, web_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 !

 Signature 

Mickaël Rémond
Process-one

Profile
 
 
Posted: 21 March 2007 05:44 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  128
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.

 Signature 

Mickaël Rémond
Process-one

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:  128
Joined  2006-11-12

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

 Signature 

Mickaël Rémond
Process-one

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:  128
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 !

 Signature 

Mickaël Rémond
Process-one

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