- Use
ember-deploy
+ ember-deploy-s3
+ ember-deploy-s3-index
npm install --save-dev ember-deploy ember-deploy-s3 ember-deploy-s3-index
- Update nginx with the following config
server {
listen 80;
server_name foo.example.dev;
location / {
set $s3_bucket 'my-ember-app-index.s3.amazonaws.com';
set $url_full '$1';
proxy_http_version 1.1;
proxy_set_header Host $s3_bucket;
proxy_set_header Authorization '';
proxy_hide_header x-amz-id-2;
proxy_hide_header x-amz-request-id;
proxy_hide_header Set-Cookie;
proxy_ignore_headers "Set-Cookie";
proxy_buffering off;
proxy_intercept_errors on;
# AWS NS Resolver 172.16.0.23 instead of Google's one 8.8.8.8
resolver 8.8.8.8; # OpenDNS
#resolver 172.16.0.23; # Use this on AWS
resolver_timeout 5s;
set $index 'index.html';
if ($arg_app_ref) { set $index '<ember-manifest>:$arg_app_ref.html'; }
proxy_pass http://$s3_bucket/index.html;
}
}