Some fiddling around later, it seems that using a subrequest is much simpler than what we were trying, and as an added bonus is working (though with limited testing so far). Thanks for the pointers. Pete Posted at Nginx Forum: http://forum.nginx.org/read.php?2,64052,64673#msg-64673