[ejabberd] how to reverse proxy mod_http_upload with nginx?

pitchum pitchum at gramaton.org
Fri Oct 27 15:32:21 MSK 2017


I would like to use port 443 for HTTP uploads in order to traverse
firewalls. The problem is that I'm running nginx on the same machine and
it is already listening on port 443.

I want to set up nginx as a reverse proxy in front of mod_http_upload
but I couldn't find how to configure ejabberd so that it listens on a
given URL while transmitting another URL to the client.
I tried to play with 'service_url' option but according to the
documentation [1] it is supposed to point to a "smart" service, not just
a reverse proxy.

I was expecting an option like 'external_url' for prosody [2] and then
configuring mod_http_upload like the following:

    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.

Is there a way to achieve this?

[1]: https://docs.ejabberd.im/admin/configuration/#mod-http-upload
[2]: https://prosody.im/doc/http#external_url


More information about the ejabberd mailing list