program story

Godaddy 도메인을 AWS Elastic Beanstalk 환경과 연결하는 방법은 무엇입니까?

inputbox 2020. 8. 22. 08:48
반응형

Godaddy 도메인을 AWS Elastic Beanstalk 환경과 연결하는 방법은 무엇입니까?


Godaddy 도메인AWS Elastic Beanstalk 인스턴스연결하려고하면이 문제가 발생 합니다 . EC2 인스턴스 를 Godaddy의 도메인과 연결하는 방법에 대한 많은 문서를 찾았 지만 Elastic Beanstalk 인스턴스에는 해당되지 않았습니다. 그래서이 URL로 끝났습니다.www.MY_SITE.elasticbeanstalk.com

다음은 EC2 인스턴스에 대해 수행 한 작업입니다.

  1. 내 Godaddy 도메인 네임 서버Route 53 호스팅 영역네임 서버로 업데이트했습니다 .
  2. EC2 콘솔에서 탄력적 IP생성했습니다 .
  3. Godaddy로 돌아가서 DNS 관리자 DNS A @ 필드를 EC2 탄력적 IP로 업데이트했습니다.
  4. 일반적으로 1 시간에서 48 시간까지 기다려야하며 작동합니다.

EC2 인스턴스가 아닌 AWS Elastic Beanstalk 인스턴스에 대해 동일한 작업을 수행하려면 어떻게해야합니까? 탄력적 IP에 연결하기 위해 EC2 콘솔에서 생성 한 인스턴스를 볼 수 없습니다.

이것이 충분히 명확하길 바랍니다 .. 도움이 필요하십니까?


CNAME을 생성하거나 포워딩 할 필요가 없습니다. 이것은 SEO 측면에서 좋지 않으며 Amazon에서 권장하지 않습니다. 레코드를 직접 IP로 지정해서는 안됩니다. IP는 언제든지 변경 될 수 있기 때문에 향후 많은 문제를 야기 할 것입니다.

가장 우아한 방법은 DNS 서비스를 GoDaddy에서 Route 53 으로 마이그레이션하는 것입니다 . 여전히 GoDaddy와 함께 할 것이지만 사이트에 대한 요청을 처리하는 것은 Amazon 측에 있습니다.

수행해야 할 작업은 다음과 같습니다.

  1. Route 53 콘솔에서 사이트에 대한 새 호스팅 영역을 생성합니다. 여기에 이미지 설명 입력

  2. 새로 추가 된 도메인 이름을 열고 NS 레코드를 찾고 서버를 복사합니다. 여기에 이미지 설명 입력

  3. GoDaddy의 도메인 관리자에서 "영역 파일 내보내기 (Windows)"를 통해 레코드를 내 보냅니다.

  4. 이러한 레코드를 Route 53으로 가져옵니다 ( "Import Zone File"버튼).

  5. GoDaddy의 도메인 관리자에서 2 단계에서 얻은 사용자 지정 DNS 네임 서버를 설정합니다. 여기에 이미지 설명 입력

마이그레이션에는 시간이 걸릴 수 있습니다 (심지어 며칠). 이제 도메인을 Elastic Beanstalk 사이트와 연결할 수 있습니다. 이렇게하려면 Route 53에서 적절한 A 레코드 유형을 선택 / 생성하고 이에 대한 별칭을 설정합니다.여기에 이미지 설명 입력

도움이되기를 바랍니다.


GoDaddy 도메인을 AWS ElasticBeanstalk와 연결하는 문제에 직면했을 때 제가 한 작업은 다음과 같습니다.

DNS 관리자 :

  • A 레코드 @ : 64.202.189.170 (즉, GoDaddy의 포워딩 IP btw)
  • Cname www : AWS EB 도메인 (예 : awseb-xyz.us-east-1.elb.amazonaws.com)

전송:

  • Forward Domain to www.example.com (forward only, without masking)
  • Forward Subdomain to AWS EB domain (e.g. awseb-xyz.us-east-1.elb.amazonaws.com) (with masking)

In order to access the site without www (e.g. http://example.com), I had to set up the forwarding of the domain to the www cname. This www cname then gets forwarded to the AWS EB domain (with masking in order to keep www.example.com in the address bar).


You should add a CNAME record to your Godaddy domain name that maps from www.yourGoDaddyDomain.com -> MY_SITE.elasticbeanstalk.com.

That will direct requests to your domain name to the load balancer that is running in your elastic beanstalk environment. You don't want to route your domain name to a specific server (i.e. an elastic IP), you want it to go to the load balancer and that will route requests to your server(s). Since AWS Load balancers don't use IPs (they use domain names), you don't want to set up an A record for this - a CNAME record maps domain names to domain names.

Look at the "Adding or Editing CNAMEs" section of the GoDaddy documentation on how to do this.


Your route53 configuration has to point to the load balancer, not the ec2 instance

참고URL : https://stackoverflow.com/questions/11602232/how-to-link-godaddy-domain-with-aws-elastic-beanstalk-environment

반응형