phpMyAdmin - The plain HTTP request was sent to HTTPS port

So I tried getting phpMyAdmin to work with https again, turns out there was a solution posted back in 2008 on this blog.

His solution didn't quite work out for me, so I thought I'd update it with my working solution.

His version states add fastcgi_param HTTPS on which is correct, just at the wrong place.
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;
}


What I need to do is the following:
location ~ \.php$ {
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;
fastcgi_param HTTPS on;
}



Why? Simply cause in the conf/fastcgi_params file I had this:
fastcgi_param HTTPS $ssl_protocol;

Which doesn't seem to be good enough for good ol' phpMyAdmin, so we need to overwrite it after we include the conf file.


Fin.

Comments

Popular posts from this blog

Building XtraBackup for Mac OSX

My custom optimized build of PHP 5.5 & PHP 5.4

Remove unused kernels in Ubuntu