forked from TrueCloudLab/distribution
* Add instructions to remove also proxy_set_header Host Add instructions to remove also proxy_set_header Host when using ELB. In my case I only had commented out X-Real-IP, X-Forwarded-For, X-Forwarded-Proto, but not Host, and I was getting lots of retrys in Docker. Commenting the proxy_set_header Host fixed the issue, as recommended in https://github.com/moby/moby/issues/16949
This commit is contained in:
parent
ed56794d56
commit
4f582ad996
1 changed files with 8 additions and 7 deletions
|
@ -51,16 +51,17 @@ X-Forwarded-For
|
||||||
X-Forwarded-Proto
|
X-Forwarded-Proto
|
||||||
```
|
```
|
||||||
|
|
||||||
So if you have an nginx sitting behind it, should remove these lines from the
|
So if you have an Nginx instance sitting behind it, remove these lines from the
|
||||||
example config below:
|
example config below:
|
||||||
|
|
||||||
```
|
```none
|
||||||
X-Real-IP $remote_addr; # pass on real client's IP
|
proxy_set_header Host $http_host; # required for docker client's sake
|
||||||
X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
|
||||||
X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
```
|
```
|
||||||
|
|
||||||
Otherwise nginx will reset the ELB's values, and the requests will not be routed
|
Otherwise Nginx will reset the ELB's values, and the requests will not be routed
|
||||||
properly. For more information, see
|
properly. For more information, see
|
||||||
[#970](https://github.com/docker/distribution/issues/970).
|
[#970](https://github.com/docker/distribution/issues/970).
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue