-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify the S3 bucket region #2
Conversation
This change is required if the bucket is not in the default region. Without it, each http request to pinrepo receives a http 307 response from AWS.
@@ -1,3 +1,5 @@ | |||
resolver 127.0.0.1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line related to the region changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is. As the hostname used in proxy_pass
is no more static but dynamic, nginx needs to know which DNS resolver to connect to to do the resolution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, of course. Thanks for clarifying!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't obvious to me too when I saw nginx complaining that it couldn't resolve the host ;-)
Btw, I forgot to mention that I tested this setup with Nginx 1.8.0. And I'm only using the maven repo, hopefully the other ones should work the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rborer for the fix, let me run some sanity check on other repos and the Nginx I have, and get back to you!
In case the bucket contains a dot, the presented SSL certificate will be considered as invalid.
Looks good to me! Again, thanks a bunch for fixing this! |
Hi,
While trying pinrepo (nice work btw), I had to modify a bit the requests sent to S3 as my bucket is not in the default region. Without those changes, each http request to pinrepo was getting a http 307 response from AWS.
For example I'm using eu-west-1 as the region.
Note that I couldn't test how it does react when the bucket is indeed in the default region.