瀏覽代碼

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 年之前
父節點
當前提交
2e78f1e3c9
共有 1 個文件被更改,包括 3 次插入0 次删除
  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;