Search code examples
apachehttpsslhttpsaws-certificate-manager

Redirect http to https , what is ssl configuration?


i have installed SSL. and trying to redirect all HTTP request to HTTPS.

i came across this code snippet,

<VirtualHost *:80>
    ServerName www.example.com
    Redirect / https://www.example.com/
</VirtualHost>

<VirtualHost *:443>
    ServerName www.example.com
    # ... SSL configuration goes here
</VirtualHost>

i will add it at httpd.conf (i am using apache from the wamp bundle)

my question is what should be there in "# ... SSL Configuration goes here"

i am using AWS certificate manager with Elastic Load Balancer

Thanks


Solution

  • You need the http to https redirection in apache configuration.

    my question is what should be there in "# ... SSL Configuration goes here"?

    You don't need to add any SSL configuration since you can attach the SSL certificate to the ELB with AWS Certificates Manager, while terminating the SSL connection at the ELB.

    You can use http to communicate from ELB to the EC2 instance.