问题原文
原帖链接 · AlePouroullis · CC BY-SA 4.0
I'm quite incompetent when it comes to DNS and how traffic is routed, so this may be why I'm struggling to understand how to do what it is I want to do.
I've created a domain with a 3rd-party registrar. The root domain routes traffic to a WordPress website. I didn't set this up, so I'm not entirely sure how this was done, but I believe the registrar does WordPress hosting for you. I'm now creating APIs for the app, and I want to use subdomains for this.
I created a subdomain that I want to point to an Elastic Beanstalk application which is the API. I've tried following the docs to configure this, but I can't seem to get it to work; it still shows an empty placeholder page (which my registrar puts in place for empty domains), indicating that there's nothing hosted at the destination, meaning that traffic isn't being rerouted to the environment.
The registrar also has an admin panel that allow you to manage DNS records. This is where I'm also confused. Should I be configuring DNS via AWS at all if the registrar already sets this up for me? It automatically created an A record for the subdomain that I created. I changed the value to the public IPv4 address of the EC2 instance that the Elastic Beanstalk application is running on. But this didn't seem to do anything.
I tried creating a hosting zone on Route53 with the name of my domain. I then created an A record with the Elastic Beanstalk application as an alias. I added the name servers as NS records on the admin panel of my registrar, but once again, this didn't work.
If it might perhaps help, the 3rd-party registrar is Domains South Africa. Unfortunately, this is what I'm constrained to, but I'm sure there must be some way to do this.
Update
I received this error from support:
Please note after submitting the nameserver update for looptaxi.co.za we received the following response from the registry "Authoritative Nameserver failure for domain"
Please note that as per the registry, .co.za domain names need to be added on the nameservers before they can update the domain name with those nameservers.
Link to ZACR published policies https://registry.net.za/downloads/u/CoZa_Published_Policies_and_Procedures.pdf Published Policies and Procedures
5.3.2 When registering a new domain name, the administrator will check that the listed nameservers are properly configured for the domain name.
Should the listed nameservers fail the administrator’s checks the domain name application will be processed, but the domain name will not be published in the Co.Za zone file.
This means that it will not be reachable on the internet.
Please let us know once the domain has been added to the nameservers so we may re-submit the nameserver update from our side.
I'm trying to get the subdomain bookings-api.looptaxi.co.za to point to an elastic beanstalk application.
已采纳解答
原帖链接 · AlePouroullis · CC BY-SA 4.0
My solution wasn't necessarily the ideal one, but I now have a better understanding of where I was going wrong.
I realized that changing the name servers to the ones provided by AWS would essentially transfer the DNS management service to Route53. This meant that my domain registrar's name servers would become defunct.
I had changed the name servers to AWS's, but noticed no effect. I eventually realized that the migration takes time, and that's why I wasn't seeing any immediate response. The name servers eventually transferred, but strangely, Route53 still failed to reroute traffic to my APIs. I believe this was an issue related to my domain registrar.
Out of frustration, I decided to use my company's other domain registered on GoDaddy, which was a much simpler process.
The whole idea is, you transfer the DNS management to AWS's Route53, register subdomains as A records in a hosting zone with the root domain as the apex, using your Elastic Beanstalk environment as an alias. Once this is done, you should be able to access your Elastic Beanstalk environment using the subdomain as the URL.
Configuring HTTPS is also fortunately very simple. You can register for a certificate for free using AWS. You then just set all the domains that you'd like the certificate to be valid for. Once you've registered, note the CNAME and CNAME values that are generated when creating the certificate. Copy those values and add them as records in your hosting zone. Then, you have to set up load balancers for your Elastic Beanstalk environment. Set the port to 443 with HTTPS; the instance port to 80 with HTTP; then select the certificate you created under SSL Certificate.
Give it a moment and your subdomain should successfully be configured for HTTPS!
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
