If there is an Elastic Load Balancer and the SSL must be enforced (i.e. redirecting HTTP to HTTPS via ELB):
Modify the content of the configuration file to obtain the following lines:
If there is an Elastic Load Balancer and the SSL must be enforced (i.e. redirecting HTTP to HTTPS via ELB):
Modify the content of the configuration file to obtain the following lines:
<VirtualHost *:80>
ServerName $ELB_URL
## redirect http to https via ELB
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
CustomLog /var/log/httpd/$ELB_URL.acces.log combined
ErrorLog /var/log/httpd/$ELB_URL.error.log
</VirtualHost>
where
For more information about HTTPS while using Elastic Load Balancer, see the official documentation.