<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>>
It would be easy to proxy requests like this:</DIV>
<DIV dir=ltr>
<DIV>> <A
href="https://mydomain.com/">https://mydomain.com/</A><bucket>/<files></DIV>
<DIV> </DIV>
<DIV>> but with version4 we need to send requests like:</DIV>
<DIV>> https://<bucket>.<A
href="http://mydomain.com/">mydomain.com/</A><my_files></DIV>
<DIV> </DIV>
<DIV>> 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.</DIV>
<DIV>> Does somebody know how to properly proxy such requests?</DIV>
<DIV> </DIV>
<DIV>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). </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>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 <FONT
style='face: "Times' New roman?>https://<bucket>.</FONT><A
style='href: "http://mydomain.com/"'><FONT style='face: "Times' New
roman?>mydomain.com/</FONT></A><FONT style='face: "Times' New
roman?><my_files> to nginx you can just use a simple config:</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>A generic example (optionally the backend can be defined in seperate
upstream {} block):</DIV>
<DIV> </DIV>
<DIV>server {</DIV>
<DIV> server_name <bucket>.<A
style='href: "http://mydomain.com/"'>mydomain.com</A>;</DIV>
<DIV> location / {
<BR>
proxy_set_header Host <bucket>.<A
style='href: "http://mydomain.com/"'>mydomain.com</A>;</DIV>
<DIV>
proxy_pass <A
href="https://yours3backendhostname">https://yours3backendhostname</A>;</DIV>
<DIV> } </DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT
face="Times New Roman">rr</FONT></DIV></DIV></DIV></DIV></DIV></BODY></HTML>