Score:0

How to connect Cloudfare to an EC2 Amazon server?

me flag

Im running an Amazon EC2 server with Ubuntu. I've installed Nginx and gone through the setup instructions provided here. The link has one of the chain of tutorials. I've done all the setup, and successfully connected my google provided domain to Cloudflare. My issue is that Cloudflare isn't connecting to the server. Whenever I type in my domain, it just shows "webpage not found". Is there another guide/resource I should be using? A book perhaps?

Lex Li avatar
vn flag
1. Just enable Cloudflare as your DNS service provider, so that you can test out the basic functionality. 2. When everything works, change your Cloudflare configuration to enable more features like CDN/caching. Don't move too fast. Currently I think you didn't even configure DNS records properly and that requires a lot of reading on how to manage DNS records.
Markus Down avatar
me flag
Thanks, ill go ahead and read up more on DNS records. I really haven't done much with DNS other than connecting my Domain from Google to Cloudflare.
Markus Down avatar
me flag
@LexLi thanks for your help. I... did not have it setup. I only had the domain redirect. I didn't have my A type DNS records, only CNAME.
Lex Li avatar
vn flag
Luckily Cloudflare has extensive documentation to help you get started, https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/ and you can use search engines to find more on Cloudflare/AWS.
Markus Down avatar
me flag
For whoever comes upon this with the same question: To be able to connect I needed to: (1) Set up my domain with google and connect the Cloudflare nameserver to it (2) On cloudfare setup the DNS for www.your_domain.com and your_domain.com under A type DNS to the public IPv4 of your server (3) Have Nginx setup ^Link provided above (4) Make sure to have certbot activated (Tutorial found on Digital Ocean) I don't know if this is for all websites, but mine was a .dev, so it required a certificate.
Lex Li avatar
vn flag
You can actually write/accept your own answer below to close the discussion.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.