I am trying to serve part of website from S3 (mydomain.com/frontend-beta
).
I created bucket with name frontend-beta
and enabled static web hosting with all necessary permissions. Also able to access http://frontend-beta.s3-website-us-east-1.amazonaws.com with out any error.
When I update nginx config from where main website (mydomain.com
) is served and try to access mydomain.com/frontend-beta
I get following error
404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: frontend-beta/index.html
RequestId: 6A36E8E8DF29FBCC
HostId: SW2qCgYnhwHtXcDtD8saTIBV6YuExZ8dSZzZPedAYtagyVTq3O00BHAXAotknuF4rRUDJ1xeQYo=
in fact bucket/file does exist (frontend-beta/index.html
), but don't know why its not able to access it.
here is my nginx config
http {
upstream frontend-beta {
server frontend-beta.s3-website-us-east-1.amazonaws.com;
}
}
server {
.
.
.
location /frontend-beta/ {
proxy_pass http://frontend-beta;
}
}
Anyone know whats I am missing here ?