0
votes

I set AWS Cloudfront with EC2 origin but have some problems here my setting:

1.Alternate Domain Names (CNAMEs): xyz.com.

2.SSL Certificate: created by ACM.

3.Custom SSL Client Support: Clients that Support Server Name Indication (SNI).

4.Origin Domain Name is EC2 Public DNS.

5.Origin Protocol Policy: HTTP only.

6.Minimum Origin SSL Protocol: SSLv3.

7.Viewer Protocol Policy: Redirect HTTP to HTTPS.

8.Allowed HTTP Methods: GET, HEAD.

Problems:

1.when I call CloudFront Domain Name which is a3xxxxxx.cloudfront.net, it redirects to EC2 public DNS, not CNAME. Cloudfront DNS

ECS Public DNS

2.still see in my browser "your connection to this site is not secure".

3.I set Route53 to Cloudfron DNS but I got the error "too many redirect" in the browser.

1
Can you provide details of how did you set ssl? What exactly are your Route53 records, how do you access your domain? - Marcin
Route53 at the moment route to EC2 public IP address but when I changed to Cloudfron domain name I got an error on the browser. - Mehran
I selected Custom SSL Certificate (example.com) with the same name xyz.com for both SSL in ACM which is integrate with CloudFront and CNAME - Mehran
What does it mean " it redirects to EC2 public DNS"? CF does not redirect to anything. You have to be more specific in your question. What exactly is happening? You can provide screenshot of your errors or setup? - Marcin
The redirection from a3xxxxxx.cloudfront.net to EC2 shouldn't happen. What are your CF distro settings. Did you set something that could make such a redirection? - Marcin

1 Answers

0
votes

I found the problem in behaviour part, I have to select "Use legacy cache settings" and "Cache Based on Selected Request Headers" select All because I don't want cache just need ssl.