Răsfoiți Sursa

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
kotso 11 ani în urmă
părinte
comite
2e78f1e3c9
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      src/rpm/conf/nginx.conf

+ 3 - 0
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;