Amazon S3 downloads index.html instead of serving

后端 未结 5 1218
感情败类
感情败类 2020-12-05 12:35

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.s

5条回答
  •  南方客
    南方客 (楼主)
    2020-12-05 13:09

    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
    

    This line is the culprit:

    Content-Disposition: attachment
    

    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.

提交回复
热议问题