> 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?
If you allready have a previous working configuration for the above setup then changing the hostname which nginx uses for the backend is kind of simple – you just need to pass a Host header which works for the S3 backend (by default nginx uses whatever is in the proxy_pass directive either IP or the name from upstream {} block).
It wasn’t exactly clear (to me) how the client interacts with nginx (which is the correct url) I mean if it sends the request using https://<bucket>.mydomain.com/<my_files> to nginx you can just use a simple config:
A generic example (optionally the backend can be defined in seperate upstream {} block):
server {
server_name <bucket>.mydomain.com;
location / {
proxy_set_header Host <bucket>.mydomain.com;
proxy_pass https://yours3backendhostname;
}
}
rr_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx