Uploading Plugin/Theme in WP results in Secure Connection Failed

I am using Ubuntu 16.4 nginx as a reverse proxy and Apache php-fpm with varnish for caching. SSL traffic is being routed through nginx and any non ssl traffic is being redirect to https in the varnish config.

When I try to upload a plugin that is over 2M I get various errors relating to the server