AWS 환경 아래에 ELB 뒷단에 apache가 80 포트로만 동작중일경우
ELB에 인증서를등록하고 80 과 443을 아파치의 80으로 포워딩 할경우
httpd.conf
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI}
모든 http 호출에 대해서 https 로 변경하는 설정.
RewriteCond %{HTTP:X-Forwarded-Proto} !https
> 설명
Apache에서 X-Forwarede-Proto 헤더 벨류의 값이 https가 아니면