Uploading Plugin/Theme in WP results in Secure Connection Failed

Posted September 20, 2017 5.7k views
NginxApacheWordPressUbuntu 16.04

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.

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?


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.

Submit an Answer
1 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.