Tracking the start and complete of a download?

Eugaia ngx.eugaia at
Sat Oct 16 01:12:12 MSD 2010


On 15/10/2010 21:54, Manlio Perillo wrote:
>>   How could I configure nginx so that when a download is started and when
>> it completes, it makes a HTTP GET request to another web server?
> This is not possible.
> You need to write a custom Nginx module.

I think you should be able to use the ngx_http_echo_module to achieve 
this.  Just use an echo_subrequest directive to send a request to the 
URL that you want.  This request will only be made once the upload has 
completed.  Any other module that calls a subrequest after the files 
have been uploaded should work too.

One thing : if you don't know the server that you'll connect to at the 
time the config file is read, you'll need to set up a resolver for DNS.

Good luck!


More information about the nginx mailing list