新手求助:如何将auth.orco.space子域名指向Amazon EC2实例?
auth.orco.space to Your EC2 Instance (EVE Online Web App) Hey there! I’ll break this down clearly for you since you’re new to AWS and domain management—let’s fix this subdomain pointing issue step by step.
First, a critical note: Your main domain orco.space uses GoDaddy’s nameservers, any subdomain records must be managed in GoDaddy’s DNS console, not 123-reg. The 123-reg subdomain setup won’t work because the internet relies on GoDaddy’s nameservers to resolve your domain’s DNS information. That’s a common pitfall for new folks, so let’s focus on the right places.
Step 1: Secure a Stable IP for Your EC2 Instance
EC2 instances get a temporary public IP by default, which changes if you stop/restart the instance. To avoid breaking your subdomain later, use an Elastic IP:
- Log into the AWS EC2 Console.
- Navigate to Elastic IPs in the left sidebar.
- Click Allocate Elastic IP address, follow the prompts to allocate one.
- Once allocated, right-click the Elastic IP and select Associate Elastic IP address.
- Choose your EVE Online web server EC2 instance from the list and associate it. Now this IP will stay tied to your instance even after restarts.
Step 2: Add the DNS Record in GoDaddy
Now we’ll tell the internet where auth.orco.space should point:
- Log into your GoDaddy account, go to My Domains, and find
orco.space. - Click Manage DNS to open the DNS management dashboard.
- Click Add to create a new record:
- Type: Select
A(this maps a domain name to an IPv4 address). - Host: Enter
auth(this creates theauth.orco.spacesubdomain). - Points to: Paste the Elastic IP address you allocated for your EC2 instance.
- TTL: Leave it at the default (e.g., 300 seconds) to speed up DNS propagation.
- Type: Select
- Save the record.
Step 3: Open Web Ports in Your EC2 Security Group
Even if DNS is set correctly, your EC2 instance’s security group might block incoming web traffic. Let’s fix that:
- Go back to the AWS EC2 Console, find your EVE Online instance.
- Under the Security tab, click the linked security group.
- In the Inbound rules tab, click Edit inbound rules.
- Add two new rules:
- Type: HTTP, Source: 0.0.0.0/0 (allows all internet traffic to port 80)
- Type: HTTPS, Source: 0.0.0.0/0 (allows all internet traffic to port 443)
- Save the rules.
Step 4: Test the Subdomain
Wait 5-10 minutes for DNS changes to propagate (it can take up to 24 hours in rare cases, but usually much faster). Then:
- Open a terminal and run
nslookup auth.orco.spaceordig auth.orco.space—you should see your Elastic IP listed as the answer. - Try visiting
auth.orco.spacein your browser—your EVE Online web app should load if everything’s set up right.
Quick Troubleshooting Tips
- If the subdomain doesn’t resolve after 30 minutes, double-check the GoDaddy DNS record for typos in the IP or host field.
- If the browser shows a timeout, verify your EC2 security group rules are correctly allowing HTTP/HTTPS traffic.
- Never rely on the temporary public IP of your EC2 instance—always use an Elastic IP for domain pointing.
内容的提问来源于stack exchange,提问作者thesword22

