“The plain HTTP request was sent to HTTPS port” is an Nginx error you can some times get when using applications that are set to redirect to https.
An example is phpmyadmin where this error can occur.
If you get this error you’re missing the following code on your ssl vhost:
fastcgi_param HTTPS on;
You want to use this line in this kind of context here:
location ~ \.php$ {
fastcgi_param HTTPS on;
fastcgi_pass 127.0.0.1:xxxx;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
Advertisement

One Comment
thanks
saved me a few hours of struggling
One Trackback/Pingback
[...] For more details look here at The plain HTTP request was sent to HTTPS port. [...]