im trying to host my angular website on amazon S3.
When i access the endpoint of my website hosting S3 the index.html files is dowloaded instead of being served, cant figure out why
This seems to appear only when i upload all of my angular project, when i just upload the index.html files everything works fine
here is the metadata of my index.html:
curl -I http://mybucket.s3-website-us-west-2.amazonaws.com/
HTTP/1.1 200 OK
x-amz-id-2:
x-amz-request-id:
Date: Fri, 13 Nov 2015 11:32:50 GMT
Last-Modified: Fri, 13 Nov 2015 11:32:03 GMT
ETag: ""
Content-Type: binary/octet-stream
Content-Length: 4754
Server: AmazonS3
my bucket :
http://alpha.akt.io.s3-website-us-west-2.amazonaws.com/
and my bucket policy:
{
"Version": "2012-10-17",
"Id": "Policy1447414200659",
"Statement": [
{
"Sid": "Stmt1447414198383",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::alpha.akt.io/*"
}
]
}
Edit 1:
Looks like the content type is the probleme, i switched it to text/html and it work
But he doesn't want to load the javascript and css, i checked the content type of this files, put application/javascript and text/css to it seems to not work