Nginx support

This is the current work in progress for the nginx caching proxy support.