mod_rest module_must_be_started_in_vhost

Hi, I'm attempting to use mod_rest (latest version of trunk) with ejabberd (2.1.5), but when attempting rest calls I get no response from the server. In erlang.log it displays the error: module_must_be_started_in_vhost. However, the mod_rest module is being added to the main modules block in ejabberd.cfg, for all vhosts, like so:

%%
%% Modules enabled in all ejabberd virtual hosts.
%%
{modules,
[
%% other modules
{mod_rest, [{allowed_ips, [{127,0,0,1}]}]}
]}.

And in the listen block I have:

{5285, ejabberd_http, [
{request_handlers,
[
{["rest"], mod_rest}
]}
]}

Can anyone help explain why this error occurs?

Thanks.

What do you have in {hosts,

What do you have in {hosts, [...]}. ?

And show an example of your HTTP queries, specially the "Host:" request header.

Ahh... so the hostname of the

Ahh... so the hostname of the server must be in the {hosts, [...]}. block? That explains it, thanks!

Syndicate content