웹 취약점
Apache 서버 http -> https 리다이렉트(https redirect)
KSJ IT
2020. 12. 22. 14:06
반응형
SSL 인증서를 설치했음에도 https 로 자동으로 안들어가지는 이유는
서버에서 http 를 https 로 리다이렉트 설정을 해놓지 않았기 때문이다.
아래는 Apache httpd.conf 파일에서 설정을 하는 방식이다.
<VirtualHost *:80>
......
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
반응형