From 2e78f1e3c971f7371e69d6ca15a9cf4ce5a796b8 Mon Sep 17 00:00:00 2001 From: kotso Date: Wed, 25 Mar 2015 00:38:51 +0400 Subject: [PATCH] Fixed error when connecting to 8083 over HTTP 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 --- src/rpm/conf/nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rpm/conf/nginx.conf b/src/rpm/conf/nginx.conf index 7a3d2fd0..bf361896 100644 --- a/src/rpm/conf/nginx.conf +++ b/src/rpm/conf/nginx.conf @@ -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;