If we have xmpp server on host domain.tld
and want serve files from https://xmpp.domain.tld/upload/…
…
listen
port: 5280
ip: "127.0.0.1"
module: ejabberd_http
request_handlers:
"/upload": mod_http_upload
…
…
mod_http_upload:
host: "xmpp.@HOST@"
docroot: "/srv/ejabberd/uploads"
put_url: "https://xmpp.@HOST@/upload"
…
…
location / {
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:5280;
}