You can use the post_action directive to run sub_request after the completion of the main request.
Useful for keeping a journal that you have in mind.
** OCT 2016 UPDATE **
The post_action directive has been removed from the Nginx documentation, and although it still works, use is not practical. Let the buyer be vigilant!
source share