[ejabberd] how to reverse proxy mod_http_upload with nginx?

Holger Weiß holger at zedat.fu-berlin.de
Fri Oct 27 18:22:31 MSK 2017


* pitchum <pitchum at gramaton.org> [2017-10-27 17:02]:
> Le 27/10/2017 à 14:57, Holger Weiß a écrit :
> > Is there a reason you're still using a get_url that's different from
> > the put_url, by the way?
> 
> Yes, I want nginx to respond to GET requests directly, like this:
> 
>     ...
>     location /data {
>         alias /srv/ejabberd/upload;
>     }
>     location /upload {
>         proxy_pass http://example.net:5280/upload;
>         include proxy_params;
>     }
>     ...

I do something like this instead:

    location /upload {
        # Pass all requests to ejabberd, except for GET and HEAD requests.
        limit_except GET {
            proxy_pass http://127.0.0.1:5280/upload;
        }
        proxy_set_header Host $host;
    }

Holger


More information about the ejabberd mailing list