Fixed error "400 The plain HTTP request was sent to HTTPS port" By putting custom error page on http error coder 497 that redirects http uri to https uri
@@ -82,6 +82,9 @@ http {
root /usr/local/vesta/web;
charset utf-8;
+ // Fix error "The plain HTTP request was sent to HTTPS port"
+ error_page 497 https://$host:$server_port$request_uri;
+
ssl on;
ssl_certificate /usr/local/vesta/ssl/certificate.crt;
ssl_certificate_key /usr/local/vesta/ssl/certificate.key;