Commit Graph

3 Commits

Author SHA1 Message Date
Thomas Soubrier 46cbbc6d73
Update object-storage-proxy.md (#1056)
This documentation has I believe one very confusing point: It uses two times `YOUR_S3_HOSTNAME` in the nginx configuration example, however the second time it looks like you actually have to use `YOUR_BUCKET_NAME.YOUR_S3_HOSTNAME`.

## Explanation
Mastodon is using path-style requests to S3 which looks like this:
https://s3.region-code.amazonaws.com/bucket-name/key-name

Once you enable the new virtual host nginx file using the current indications, the path-style request which goes to amazon looks like this:
https://s3.region-code.amazonaws.com/key-name

In other words, the bucket name is not being sent S3 and the images break.

This is because the current instructions make it seem like the header Host name is not including the bucket
`proxy_set_header Host YOUR_S3_HOSTNAME;`

With the current path-style request integration, one must use the bucket name in the Host header for this to work, hence the proposed change to

`proxy_set_header Host YOUR_BUCKET_NAME.YOUR_S3_HOSTNAME;`
2023-03-29 10:52:31 +02:00
Y.Yamashiro 64607d49e1
Change S3 access style (#799) 2020-09-28 05:10:25 +02:00
Eugen Rochko 3375a76538 Add documentation on how to proxy S3 through nginx 2020-07-26 23:45:00 +02:00