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

In firefox I consistently get Secure Connection Failed

In Chrome I get…

This site can’t be reached

The webpage at might be temporarily down or it may have moved permanently to a new web address. ERR_FAILED

If I try to upload something to the media library I get http error if the file is large if the file is not over 2M it uploads fine.

I have increased my limits in my php.ini file and it is reflected everywhere…

Maximum upload file size: 128 MB.

the post size also…

Anyone have any insight?


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I was able to get this working. Turned out all I needed to do was add the following directive to the nginx vhost file…


 server {
      client_max_body_size 100m;

    location / {

This seemed to work for me but I am not sure why this is needed when I am setting things in my php.ini file.