[ejabberd] how to reverse proxy mod_http_upload with nginx?

pitchum pitchum at gramaton.org
Fri Oct 27 15:48:34 MSK 2017

Le 27/10/2017 à 14:38, Holger Weiß a écrit :
> * pitchum <pitchum at gramaton.org> [2017-10-27 14:32]:
>> I was expecting an option like 'external_url' for prosody [2] and then
>> configuring mod_http_upload like the following:
>>   mod_http_upload:
>>     put_url: "http://jabber.example.net:5280/upload"
>>     get_url: "https://jabber.example.net/data"
>>     external_url: "https://jabber.example.net/upload"
>> 'put_url' would be served by ejabberd while 'external_url' would be
>> served by nginx and sent to the client as the upload slot to use.
> The 'put_url' is what you think of as the 'external_url': It's sent to
> the client as the upload slot to use and can be served by Nginx.  I.e.,
> you can just specify something like this:
>   put_url: "https://jabber.example.net/upload"

Doing this prevents ejabberd from starting. I guess this is because
ejabberd tries to spawn its own HTTP server to listen on port 443 which
is already used by nginx.

Here is the log (I don't know how to interpret it though):

2017-10-27 14:41:46.324 [critical] <0.247.0>@gen_mod:start_module:212
Problem starting the module mod_http_upload for host jabber.example.net
 options: [{put_url,<<"https://jabber.example.net/upload">>},
 error: {error,{already_started,<0.483.0>}}
2017-10-27 14:41:46.326 [critical]
<0.247.0>@gen_mod:maybe_halt_ejabberd:294 ejabberd initialization was
aborted because a module start failed.


More information about the ejabberd mailing list