{"action":"created","issue":{"url":"https://api.github.com/repos/ekristen/docker-index-nginx/issues/2","labels_url":"https://api.github.com/repos/ekristen/docker-index-nginx/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/ekristen/docker-index-nginx/issues/2/comments","events_url":"https://api.github.com/repos/ekristen/docker-index-nginx/issues/2/events","html_url":"https://github.com/ekristen/docker-index-nginx/issues/2","id":70011573,"number":2,"title":"some confusion on docker-index-nginx configuration in \"default\"","user":{"login":"afengisme","id":3294377,"avatar_url":"https://avatars.githubusercontent.com/u/3294377?v=3","gravatar_id":"","url":"https://api.github.com/users/afengisme","html_url":"https://github.com/afengisme","followers_url":"https://api.github.com/users/afengisme/followers","following_url":"https://api.github.com/users/afengisme/following{/other_user}","gists_url":"https://api.github.com/users/afengisme/gists{/gist_id}","starred_url":"https://api.github.com/users/afengisme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afengisme/subscriptions","organizations_url":"https://api.github.com/users/afengisme/orgs","repos_url":"https://api.github.com/users/afengisme/repos","events_url":"https://api.github.com/users/afengisme/events{/privacy}","received_events_url":"https://api.github.com/users/afengisme/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-22T03:35:08Z","updated_at":"2015-04-26T10:59:39Z","closed_at":"2015-04-24T12:34:27Z","body":"Good day,\r\n\r\nthe proxy configurations as below,  I note that this configuration:  \"location /\"\r\n\r\n########\r\nserver {\r\n  listen *:443;\r\n  server_name registry;\r\n  ssl on;\r\n  ssl_certificate /etc/nginx/ssl/certificate.crt;\r\n  ssl_certificate_key /etc/nginx/ssl/private.key;\r\n\r\n  client_max_body_size 0;\r\n  proxy_set_header  Host           $http_host;   # required for docker client's sake\r\n  proxy_set_header  X-Real-IP      $remote_addr; # pass on real client's IP\r\n\r\n  location / {\r\n    proxy_pass  http://registry;\r\n  }\r\n}\r\n\r\nserver {\r\n  listen *:443;\r\n  server_name index;\r\n\r\n  ssl on;\r\n  ssl_certificate /etc/nginx/ssl/certificate.crt;\r\n  ssl_certificate_key /etc/nginx/ssl/private.key;\r\n\r\n  client_max_body_size 0;\r\n  proxy_set_header  Host           $http_host;   # required for docker client's sake\r\n  proxy_set_header  X-Real-IP      $remote_addr; # pass on real client's IP\r\n\r\n  location / {\r\n    proxy_pass  http://index;\r\n  }\r\n}\r\n\r\n##########\r\n\r\n\r\ndoes it mean when the access url is https://xxx.xxx.xxx/  will always proxy to http://registy priorly. \r\n\r\nbecause both server registry and index are all the same proxy-url \"location /\" , and server registry is at the prior position in the config file.\r\n\r\nafter fig up the containers, I tried to \"docker login https://xxxx.xxx.xxx\" , it was failed:\r\nUsername: admin\r\nPassword:\r\nEmail: xxx@xxx.com\r\nFATA[0015] Error response from daemon:\r\n\r\nThen I tried to run \"docker logs <registry_container_id> \" to check the logs on registry container, I found this log:\r\n#########\r\n10.0.0.41 - - [22/Apr/2015:02:15:12 +0000] \"POST /v1/users/ HTTP/1.0\" 404 233 \"-\" \"Go 1.1 package http\"\r\n#########\r\n\r\n10.0.0.41 is the nginx container IP,  this type of log (\"..... POST /v1/users/ .....\")  means it POST the requst to registry container,  right ?  \r\nshould not  nginx proxy send the request to index container ?  docker-index container is the right one to deal with this type of request.\r\n\r\nDoes the nginx proxy configuring \"location /\"  resulted that ? \r\n\r\nanyont encountered this issue ?\r\n\r\nthanks a lot.\r\n"},"comment":{"url":"https://api.github.com/repos/ekristen/docker-index-nginx/issues/comments/96365088","html_url":"https://github.com/ekristen/docker-index-nginx/issues/2#issuecomment-96365088","issue_url":"https://api.github.com/repos/ekristen/docker-index-nginx/issues/2","id":96365088,"user":{"login":"afengisme","id":3294377,"avatar_url":"https://avatars.githubusercontent.com/u/3294377?v=3","gravatar_id":"","url":"https://api.github.com/users/afengisme","html_url":"https://github.com/afengisme","followers_url":"https://api.github.com/users/afengisme/followers","following_url":"https://api.github.com/users/afengisme/following{/other_user}","gists_url":"https://api.github.com/users/afengisme/gists{/gist_id}","starred_url":"https://api.github.com/users/afengisme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afengisme/subscriptions","organizations_url":"https://api.github.com/users/afengisme/orgs","repos_url":"https://api.github.com/users/afengisme/repos","events_url":"https://api.github.com/users/afengisme/events{/privacy}","received_events_url":"https://api.github.com/users/afengisme/received_events","type":"User","site_admin":false},"created_at":"2015-04-26T10:59:39Z","updated_at":"2015-04-26T10:59:39Z","body":"thanks Erik\r\n\r\nGot it,  I will deploy the docker-registry and docker-index on different physical machines for production environment."}}