diff --git a/volumes/conf.d/registry.zinomedia.de.conf b/volumes/conf.d/registry.zinomedia.de.conf index 2ab3b46..39a16de 100644 --- a/volumes/conf.d/registry.zinomedia.de.conf +++ b/volumes/conf.d/registry.zinomedia.de.conf @@ -28,6 +28,10 @@ server { # required to avoid HTTP 411: see Issue #1486 (https://github.com/moby/moby/issues/1486) chunked_transfer_encoding on; + # Password protect + auth_basic "Protected Registry"; + auth_basic_user_file /usr/share/nginx/html/registry.zinomedia.de/.htpasswd; + location /v2/ { # Do not allow connections from docker 1.5 and earlier # docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents @@ -35,10 +39,6 @@ server { return 404; } - # Password protect - auth_basic "Protected Registry"; - auth_basic_user_file /usr/share/nginx/html/registry.zinomedia.de/.htpasswd; - ## If $docker_distribution_api_version is empty, the header is not added. ## See the map directive above where this variable is defined. add_header 'Docker-Distribution-Api-Version' $docker_distribution_api_version always;