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
This commit is contained in:
kotso 2015-03-25 00:38:51 +04:00
commit 2e78f1e3c9

View file

@ -82,6 +82,9 @@ http {
root /usr/local/vesta/web; root /usr/local/vesta/web;
charset utf-8; 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 on;
ssl_certificate /usr/local/vesta/ssl/certificate.crt; ssl_certificate /usr/local/vesta/ssl/certificate.crt;
ssl_certificate_key /usr/local/vesta/ssl/certificate.key; ssl_certificate_key /usr/local/vesta/ssl/certificate.key;