Nginx SSL 에러 코드를 이용해서 http 요청이 https Port로 들어왔을 때, Redirect 시킬 수 있습니다.
이를 이용해서 http -> https Redirect를 손쉽게 적용 가능합니다.

예시: error_page 497 www.google.com

에러정보:

  • 495 : an error has occurred during the client certificate verification;
  • 496 : a client has not presented the required certificate;
  • 497 : a regular request has been sent to the HTTPS port.

관련링크: nginx.org/en/docs/http/ngx_http_ssl_module.html