Created
June 6, 2016 22:47
-
-
Save grrywlsn/f26b1c2504259677680b468d4c8fad1f to your computer and use it in GitHub Desktop.
Proxying Nginx to S3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* ^/(.*) { | |
set $s3_bucket = "<bucket-name>.s3-website-eu-west-1.amazonaws.com"; | |
proxy_http_version 1.1; | |
proxy_buffering off; | |
proxy_ignore_headers "Set-Cookie"; | |
proxy_hide_header x-amz-id-2; | |
proxy_hide_header x-amz-request-id; | |
proxy_hide_header x-amz-meta-s3cmd-attrs; | |
proxy_hide_header Set-Cookie; | |
proxy_set_header Host $s3_bucket; | |
proxy_set_header Authorization ""; | |
proxy_intercept_errors on; | |
proxy_pass http://$s3_bucket/$1; | |
break; | |
} |
shouldn't it be
set $s3_bucket "<bucket-name>.s3-website-eu-west-1.amazonaws.com";
(no=
)?
Yep, that will be more syntactically correct. (Full disclosure, this file is 4 years old and I haven't touched this since).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
shouldn't it be
set $s3_bucket "<bucket-name>.s3-website-eu-west-1.amazonaws.com";
(no=
)?