Setup of Amazon Cloudfront with EC2 instance as origin and custom domain nameHow to safely upgrade an Amazon EC2 instance from t1.micro to large?Trying to SSH into an Amazon Ec2 instance - permission errorPermission denied (publickey) when SSH Access to Amazon EC2 instanceLinking Amazon Route 53 Domain Name to EC2 instanceHow to get an SSL certificate installed using Amazon Certificate Manager up on using CloudFront for a single EC2 instance?How to redirect non-www traffic to www for site hosted on EC2 instance behind CloudFront?Cloudfront with EC2 instanceapache and cloudfront redirect to ec2 url rewrite (laravel website)
Why is the Digital 0 not 0V in computer systems?
Where can I get an anonymous Rav Kav card issued?
Writing a love interest for my hero
Evidence that matrix multiplication cannot be done in O(n^2 poly(log(n))) time
Is there an inconsistency about Natasha Romanoff's middle name in the MCU?
Is there any way to land a rover on the Moon without using any thrusters?
What exactly is a marshrutka (маршрутка)?
A shy person in a queue
Why does Coq include let-expressions in its core language
Why is the T-1000 humanoid?
Why did it become so much more expensive to start a university?
Does an oscilloscope subtract voltages as phasors?
Why do sellers care about down payments?
How can I locate a missing person abroad?
Why is Kirchoff's loop rule true in a DC circuit?
Double it your way
Were Roman public roads build by private companies?
Should I leave the first authorship of our paper to the student who did the project whereas I solved it?
How can I fix a framing mistake so I can drywall?
How to stabilise the bicycle seatpost and saddle when it is all the way up?
What is a realistic time needed to get a properly trained army?
Do ibuprofen or paracetamol cause hearing loss?
Is there a real-world mythological counterpart to WoW's "kill your gods for power" theme?
"Literally" Vs "In the true sense of the word"
Setup of Amazon Cloudfront with EC2 instance as origin and custom domain name
How to safely upgrade an Amazon EC2 instance from t1.micro to large?Trying to SSH into an Amazon Ec2 instance - permission errorPermission denied (publickey) when SSH Access to Amazon EC2 instanceLinking Amazon Route 53 Domain Name to EC2 instanceHow to get an SSL certificate installed using Amazon Certificate Manager up on using CloudFront for a single EC2 instance?How to redirect non-www traffic to www for site hosted on EC2 instance behind CloudFront?Cloudfront with EC2 instanceapache and cloudfront redirect to ec2 url rewrite (laravel website)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Can you guys help me out in identifying what I am doing wrong in setting up the cloudfront for my ec2 instance (web server) for a custom domain of mine.
I am using my domain name (www.example.com) as the origin domain name.
I have also supplied a certificate to the cloudfront (*.example.com) using ACM.
The problem I am facing is, when i point out my custom domain name to the cloud fronts domain name in route53 using an alias record.
My website responds with an error 502. I'll really appreciate any help. I have explored all the content provided by AWS in respect to this but nothing seems to work till now.
amazon-web-services amazon-ec2 amazon-cloudfront amazon-route53
add a comment
|
Can you guys help me out in identifying what I am doing wrong in setting up the cloudfront for my ec2 instance (web server) for a custom domain of mine.
I am using my domain name (www.example.com) as the origin domain name.
I have also supplied a certificate to the cloudfront (*.example.com) using ACM.
The problem I am facing is, when i point out my custom domain name to the cloud fronts domain name in route53 using an alias record.
My website responds with an error 502. I'll really appreciate any help. I have explored all the content provided by AWS in respect to this but nothing seems to work till now.
amazon-web-services amazon-ec2 amazon-cloudfront amazon-route53
Does it work if you point to Route 53 directly (using the cloudfront.net domain name)?
– John Rotenstein
Mar 28 at 11:02
add a comment
|
Can you guys help me out in identifying what I am doing wrong in setting up the cloudfront for my ec2 instance (web server) for a custom domain of mine.
I am using my domain name (www.example.com) as the origin domain name.
I have also supplied a certificate to the cloudfront (*.example.com) using ACM.
The problem I am facing is, when i point out my custom domain name to the cloud fronts domain name in route53 using an alias record.
My website responds with an error 502. I'll really appreciate any help. I have explored all the content provided by AWS in respect to this but nothing seems to work till now.
amazon-web-services amazon-ec2 amazon-cloudfront amazon-route53
Can you guys help me out in identifying what I am doing wrong in setting up the cloudfront for my ec2 instance (web server) for a custom domain of mine.
I am using my domain name (www.example.com) as the origin domain name.
I have also supplied a certificate to the cloudfront (*.example.com) using ACM.
The problem I am facing is, when i point out my custom domain name to the cloud fronts domain name in route53 using an alias record.
My website responds with an error 502. I'll really appreciate any help. I have explored all the content provided by AWS in respect to this but nothing seems to work till now.
amazon-web-services amazon-ec2 amazon-cloudfront amazon-route53
amazon-web-services amazon-ec2 amazon-cloudfront amazon-route53
asked Mar 28 at 10:05
Chetan RathoreChetan Rathore
31 bronze badge
31 bronze badge
Does it work if you point to Route 53 directly (using the cloudfront.net domain name)?
– John Rotenstein
Mar 28 at 11:02
add a comment
|
Does it work if you point to Route 53 directly (using the cloudfront.net domain name)?
– John Rotenstein
Mar 28 at 11:02
Does it work if you point to Route 53 directly (using the cloudfront.net domain name)?
– John Rotenstein
Mar 28 at 11:02
Does it work if you point to Route 53 directly (using the cloudfront.net domain name)?
– John Rotenstein
Mar 28 at 11:02
add a comment
|
1 Answer
1
active
oldest
votes
Most 502 from CloudFront caused by the SSL communication between CloudFront and Origin.
CloudFront makes sure that your origin:
1.Has Trusted certificate
2. Ciphers matches
3. CloudFront uses the SNI filed in Client hello which is defined as Origin domain name, it most cases if you have cert on EC2 with www.example.com CN, you can forward HOST header and it should solve your problem.
- If you don't have HTTPS running on Origin, you can select HTTP only in Origin protocol policy as its bydefault set to Viewer match.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html
I believe I will try forwarding the HOST header otherwise the only option left is to us HTTP only.
– Chetan Rathore
Mar 29 at 12:45
add a comment
|
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55394866%2fsetup-of-amazon-cloudfront-with-ec2-instance-as-origin-and-custom-domain-name%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Most 502 from CloudFront caused by the SSL communication between CloudFront and Origin.
CloudFront makes sure that your origin:
1.Has Trusted certificate
2. Ciphers matches
3. CloudFront uses the SNI filed in Client hello which is defined as Origin domain name, it most cases if you have cert on EC2 with www.example.com CN, you can forward HOST header and it should solve your problem.
- If you don't have HTTPS running on Origin, you can select HTTP only in Origin protocol policy as its bydefault set to Viewer match.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html
I believe I will try forwarding the HOST header otherwise the only option left is to us HTTP only.
– Chetan Rathore
Mar 29 at 12:45
add a comment
|
Most 502 from CloudFront caused by the SSL communication between CloudFront and Origin.
CloudFront makes sure that your origin:
1.Has Trusted certificate
2. Ciphers matches
3. CloudFront uses the SNI filed in Client hello which is defined as Origin domain name, it most cases if you have cert on EC2 with www.example.com CN, you can forward HOST header and it should solve your problem.
- If you don't have HTTPS running on Origin, you can select HTTP only in Origin protocol policy as its bydefault set to Viewer match.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html
I believe I will try forwarding the HOST header otherwise the only option left is to us HTTP only.
– Chetan Rathore
Mar 29 at 12:45
add a comment
|
Most 502 from CloudFront caused by the SSL communication between CloudFront and Origin.
CloudFront makes sure that your origin:
1.Has Trusted certificate
2. Ciphers matches
3. CloudFront uses the SNI filed in Client hello which is defined as Origin domain name, it most cases if you have cert on EC2 with www.example.com CN, you can forward HOST header and it should solve your problem.
- If you don't have HTTPS running on Origin, you can select HTTP only in Origin protocol policy as its bydefault set to Viewer match.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html
Most 502 from CloudFront caused by the SSL communication between CloudFront and Origin.
CloudFront makes sure that your origin:
1.Has Trusted certificate
2. Ciphers matches
3. CloudFront uses the SNI filed in Client hello which is defined as Origin domain name, it most cases if you have cert on EC2 with www.example.com CN, you can forward HOST header and it should solve your problem.
- If you don't have HTTPS running on Origin, you can select HTTP only in Origin protocol policy as its bydefault set to Viewer match.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html
answered Mar 28 at 11:25
James DeanJames Dean
1,4871 gold badge2 silver badges7 bronze badges
1,4871 gold badge2 silver badges7 bronze badges
I believe I will try forwarding the HOST header otherwise the only option left is to us HTTP only.
– Chetan Rathore
Mar 29 at 12:45
add a comment
|
I believe I will try forwarding the HOST header otherwise the only option left is to us HTTP only.
– Chetan Rathore
Mar 29 at 12:45
I believe I will try forwarding the HOST header otherwise the only option left is to us HTTP only.
– Chetan Rathore
Mar 29 at 12:45
I believe I will try forwarding the HOST header otherwise the only option left is to us HTTP only.
– Chetan Rathore
Mar 29 at 12:45
add a comment
|
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55394866%2fsetup-of-amazon-cloudfront-with-ec2-instance-as-origin-and-custom-domain-name%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does it work if you point to Route 53 directly (using the cloudfront.net domain name)?
– John Rotenstein
Mar 28 at 11:02