title: docker login returns a 404 for artifactory
body: <p>I have the following nginx configuration for docker repository in artfactory</p>
  
  <pre><code>server {
      listen 2222 ssl;
  
      server_name rproxy.company.com;
      if ($http_x_forwarded_proto = '') {
          set $http_x_forwarded_proto  $scheme;
      }
  
      rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/docker-dev/$1/$2;
      client_max_body_size 0;
      chunked_transfer_encoding on;
  
      location / {
      allow all;
      proxy_read_timeout  900;
      proxy_pass_header   Server;
      proxy_cookie_path ~*^/.* /;
      proxy_set_header   X-Artifactory-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
      proxy_set_header    X-Forwarded-Port  $server_port;
      proxy_set_header    X-Forwarded-Proto $http_x_forwarded_proto;
      proxy_set_header    Host              $http_host;
      proxy_set_header    X-Forwarded-For   $proxy_add_x_forwarded_for;
      proxy_pass http://artifactory_lb;
      }
  </code></pre>
  
  <p>But docker login <code>rproxy.compan.com:2222</code> returns a 404</p>
  
  <p>Here is the access log for this request</p>
  
  <blockquote>
    <p>"GET
    /api/docker/docker-dev/v2/token?account=myUsre&amp;client_id=docker&amp;offline_token=true&amp;service=rproxy.company.com%3A2222
    HTTP/1.1" 404 473 "-" "docker/1.11.0 go/go1.5.4 git-commit/4dc5990
    kernel/3.13.0-24-generic os/linux arch/amd64
    UpstreamClient(Docker-Client/1.11.0 \x5C(linux\x5C))"</p>
  </blockquote>
  
  <p>The command <code>curl -umyUser:myPass "https://rproxy.company.com:2222/v2/auth"</code>
  returns the correct auth token</p>
  
  <p>Also I am on Docker version 1.11 and Artifactory version 4.60. Any pointers to what I may be missing?</p>
  
  <p>Does the reverse proxy also need to be configured from the web interface for docker reositories?</p>