This error drove me nuts last night and tonight, trying to sort out what the issue was. Specifically in my case, it was with phpmyadmin running on a secure (HTTPS) site.
The plain HTTP request was sent to HTTPS port
If you get this error, you are missing the following line from your fastcgi setup for your ssl vhost:
fastcgi_param HTTPS on;
To show that in context, you want something similar to:
location ~ \.php$ {
fastcgi_param HTTPS on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/securehost$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}