Skip navigation

“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;
}

Advertisements

One Comment

  1. thanks 🙂 saved me a few hours of struggling


One Trackback/Pingback

  1. By Nginx phpMyAdmin Https « Hone Watson Bookmarks on 15 Apr 2008 at 11:38 pm

    […] For more details look here at The plain HTTP request was sent to HTTPS port. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: