Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (21 sloc) 904 Bytes
server {
listen 8000;
location / {
proxy_pass http://your_s3_bucket.s3.amazonaws.com;
aws_access_key your_aws_access_key;
aws_secret_key the_secret_associated_with_the_above_access_key;
s3_bucket your_s3_bucket;
proxy_set_header Authorization $s3_auth_token;
proxy_set_header x-amz-date $aws_date;
}
# This is an example that does not use the server root for the proxy root
location /myfiles {
proxy_pass http://your_s3_bucket.s3.amazonaws.com/;
aws_access_key your_aws_access_key;
aws_secret_key the_secret_associated_with_the_above_access_key;
s3_bucket your_s3_bucket;
chop_prefix /myfiles; # Take out this part of the URL before signing it, since '/myfiles' will not be part of the URI sent to Amazon
proxy_set_header Authorization $s3_auth_token;
proxy_set_header x-amz-date $aws_date;
}
}