How to use Nginx as a proxy for S3 compatible storage with version 4 signature?

Alexandr Porunov alexandr.porunov at gmail.com
Wed Dec 14 12:08:12 UTC 2016


Hello,

I want to use Nginx as a proxy for private S3 compatible storage (i.e. It
isn't s3.amazon.com but has the exactly the same API).

I am novice in Nginx so I am not sure if I will explain correctly but I
will try.

I have 3 nodes:

mydomain.com - node with nginx
s3storage - private storage with S3 API
client - client which wants to use S3 storage through Nginx. This client
can work only with version 4 signature of S3

So, "client" sends requests to Nginx like this:
https://<bucket>.mydomain.com/<my_files>

Now I need to proxy that requests to "s3storage" but I don't know how. The
problem is that I need to send requests with version 4 signature which must
use bucket name as a part of url and it is confusing.
It would be easy to proxy requests like this:
https://mydomain.com/<bucket>/<files>

but with version4 we need to send requests like:
https://<bucket>.mydomain.com/<my_files>

The problem is that s3storage is a private node which hasn't a public
domain. Only Nginx (which is a public node) can see s3storage.

Does somebody know how to properly proxy such requests?

Please, tell me if I missed something or the question isn't clearly asked

Sincerely,
Alexandr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20161214/d003f442/attachment.html>


More information about the nginx mailing list