diff --git a/docs/recipes/nginx.md b/docs/recipes/nginx.md index 9c88256a..7708ed38 100644 --- a/docs/recipes/nginx.md +++ b/docs/recipes/nginx.md @@ -51,16 +51,17 @@ X-Forwarded-For 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: -``` -X-Real-IP $remote_addr; # pass on real client's IP -X-Forwarded-For $proxy_add_x_forwarded_for; -X-Forwarded-Proto $scheme; +```none +proxy_set_header Host $http_host; # required for docker client's sake +proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP +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 [#970](https://github.com/docker/distribution/issues/970). @@ -198,4 +199,4 @@ tag and push your first image: docker login -u=testuser -p=testpassword -e=root@example.ch myregistrydomain.com:5043 docker tag ubuntu myregistrydomain.com:5043/test docker push myregistrydomain.com:5043/test - docker pull myregistrydomain.com:5043/test \ No newline at end of file + docker pull myregistrydomain.com:5043/test