我已将 Node 应用程序部署到 Amazon EC2 实例上。然后我尝试将我的域指向这个实例。我按照 http://docs.aws.amazon.com/gettingstarted/latest/swh/getting-started-configure-route53.html 上的指南进行操作。
我创建了一个托管区域,输入 mydomain.com。
然后,我为域和子域创建了记录集。
在为域创建记录时,我输入了以下详细信息:
- 对于类型 I,选择“A — IPv4 地址”
- 对于别名,我选择"is"。
- 对于别名目标,指南显示“从列表中选择您的根域网站端点(例如 example.com)”。然而,对我来说,下拉列表中没有我的域。它只有“没有可用目标”。我搜索了一些论坛,很多人都有这个问题,建议是输入“s3-website-eu-west-1.amazonaws.com”,我就是这样做的。
我对子域执行了相同的操作,再次输入“s3-website-eu-west-1.amazonaws.com”。
然后,我前往购买域名的服务并输入名称服务器。
但是,当我访问我的网址时,我得到:
Code: NoSuchBucket
Message: The specified bucket does not exist
BucketName: mydomain.com
RequestId: 656B653A2ED5B2B1
HostId: 9etNAX1XEJmbVKUAMylBDz3xEky+7RhAnr9b8HhpkIb9+pkMnn920v/MSAUjr78oyONEUdlba50=
你知道我做错了什么吗?
最佳答案
When you configure an Amazon S3 bucket for website hosting, you must give the bucket the same name as the record that you want to use to route traffic to the bucket. For example, if you want to route traffic for
example.com
to an S3 bucket that is configured for website hosting, the name of the bucket must be `example.com.
和
If you want to route traffic to an S3 bucket that is configured for website hosting but the name of the bucket doesn't appear in the Alias Target list in the Amazon Route 53 console, or if you're trying to create an alias record programmatically and you're getting an InvalidInput error from the Route 53 API, one of the AWS SDKs, the AWS CLI, or AWS Tools for Windows PowerShell, check the following:
The name of the bucket exactly matches the name of the record, such as example.com or www.example.com.
The S3 bucket is correctly configured for website hosting. For more information, see Hosting a Static Website on Amazon S3 in the Amazon Simple Storage Service Developer Guide.
关于javascript - AWS - 输入域 URL 时没有此类存储桶错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35316885/