DNS allows for human-readable addresses

Learning objectives

  • Details that we won’t dig into:
    • Describe the pieces of a fully qualified domain name (FQDN).
    • Explain why DNS changes can take a long time to propagate.
    • Use DNS records to route traffic to a domain.
  • Configure a domain name for an AWS EC2.
    • Allocate an Elastic IP.
    • Configure DNS records to route traffic to an AWS EC2.

Allocate an Elastic IP

  • (Make sure the server from Chapter 12 is running, with /rstudio & /palmer via nginx)
  • Navigate to “EC2” > “Network & Security” > “Elastic IPs”
  • “Allocate Elastic IP Address” (and click “Allocate”)
  • “Actions” / “Associate Elastic IP Address”
    • Find the instance
  • To clean up, you can do “Actions” / “Release Elastic IP Addresses”

Configure DNS Records

  • (Register a domain)
  • Find the “DNS” settings for that domain at your registrar
  • Add or edit 3 records:
    • A * 12.345.678.90
    • A @ 12.345.678.90
    • CNAME www yourdomain.you

Reconfigure nginx

  • sudo vim /etc/nginx/nginx.conf
  • server_name ec2.whatever; to server_name yourdomain.you www.yourdomain.you;
  • sudo systemctl restart nginx
  • Visit http://yourdomain.you/rstudio and http://yourdomain.you/palmer/stats
    • Chrome will yell at you since https won’t work yet. See the next chapter!

Meeting Videos

Cohort 1

Meeting chat log
00:21:29    novica nakov: it's more fun with more than one key :)
00:22:45    novica nakov: no you copied in your local folder
00:28:28    Tinashe Tapera: ssh-copy-id: https://www.ssh.com/academy/ssh/copy-id
00:41:20    Gus Lipkin: There’s a gui Docker image available for nginx that makes things easier (or more complicated depending on how you feel): https://nginxproxymanager.com/
00:43:09    Tinashe Tapera: This is really nice
00:51:45    Ahmed: pretty cool!