我已经设置了Amazon S3来服务我的静态站点speakeasylinguistics.com
。所有的DNS内容似乎都可以正常工作,因为dig +recurse +trace www.speakeasylinguistics.com
输出正确的DNS信息。
但是,当您使用端点visit the site in a browser时,index.html
页面将下载,而不是被提供。我该如何解决?
我尝试过Chrome,Safari,FF。它发生在所有人身上。我在将自定义域托管到T时使用了Amazon's walkthrough。
最佳答案
对您发布的URL运行curl -I会得到以下结果:
curl -I http://speakeasylinguistics.com.s3-website-us-east-1.amazonaws.com/
HTTP/1.1 200 OK
x-amz-id-2: DmfUpbglWQ/evhF3pTiXYf6c+gIE8j0F6mw7VmATOpfc29V5tb5YTeojC68jE7Rd
x-amz-request-id: E233603809AF9956
Date: Sun, 18 Aug 2013 07:58:55 GMT
Content-Disposition: attachment
Last-Modified: Sun, 18 Aug 2013 07:05:20 GMT
ETag: "eacded76ceb4831aaeae2805c892fa1c"
Content-Type: text/html
Content-Length: 2585
Server: AmazonS3
这是罪魁祸首:
Content-Disposition: attachment
如果您使用的是AWS控制台,我相信可以通过在S3中选择文件并通过删除此属性来修改其元数据来进行更改。