亚马逊S3下载的index.html,而不是服务 [英] Amazon S3 downloads index.html instead of serving
问题描述
我已经设置了亚马逊S3服务我的静态网站, speakeasylinguistics.com
。所有的DNS的东西似乎是工作没关系,因为挖+递归+追踪www.speakeasylinguistics.com
输出正确的DNS信息。
I've set up Amazon S3 to serve my static site, speakeasylinguistics.com
. All of the DNS stuff seems to be working okay, because dig +recurse +trace www.speakeasylinguistics.com
outputs the correct DNS info.
但是,当你 使用的端点,在访问该网站在浏览器中 index.html的
网页下载。我该如何解决这个问题?
But when you visit the site in a browser using the endpoint, the index.html
page downloads, instead of being served. How do I fix this?
我尝试过Chrome浏览器,Safari浏览器,FF。它发生在所有的人。我用<一个href="http://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html">Amazon's演练的上托管的自定义域一件T。
I've tried Chrome, Safari, FF. It happens on all of them. I used Amazon's walkthrough on hosting a custom domain to a T.
推荐答案
对您发布的URL运行卷曲-I给出了以下结果:
Running curl -I against the url you posted gives the following result:
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中的文件,并删除此属性修改其元数据进行更改。
If you are using the AWS console, I believe this can be changed by selecting the file in S3 and modifying its meta data by removing this property.
这篇关于亚马逊S3下载的index.html,而不是服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!