400 Bad Request: The plain HTTP request was sent to HTTPS port Plesk

0

Recently upgraded to Plesk 17.5 though not marked as stable release in command line, it can be used for production site that is what i am using for my shared hosting business.

400 The plain HTTP request was sent to HTTPS port (1)

However Plesk 17.5 onyx has some issues one of it is 400 Bad Request The plain HTTP request was sent to HTTPS port.

http://123.123.123.1:8443/login_up.php3

What this means is that you are trying to access the Plesk admin area from HTTP which normally it should redirect but on Plesk 17.5 it does not, so we are going to make some hacks in Plesk panel server sw-cp-server.

What you have to do is login to your server using your favorite tool, putty or terminal. I use Winscp when it comes to editing files as it gives you that graphical feel. Navigate to the below location

/etc/sw-cp-server/conf.d

Now locate the below file

plesk.conf

Add the below line at the end of the file, make sure it is inside the curly braces

error_page 497 https://$host:$server_port$request_uri;

Once done it should look like this;

server_names_hash_bucket_size 64;



server {

listen 8443 ssl;

listen 8880;

listen 127.0.0.1:8880 default_server;

include conf.d/*ipv6_ports.inc;





ssl_certificate /usr/local/psa/admin/conf/httpsd.pem;

ssl_certificate_key /usr/local/psa/admin/conf/httpsd.pem;



include conf.d/*plesk.inc;

include conf.d/*wpb.inc;

error_page 497 https://$host:$server_port$request_uri;

}

Now all you have to do is restart the Plesk backend server, do not restart your entire server so you don’t cause down time.

service sw-cp-server restart

Curled from: