Guest User

Untitled

a guest
Jun 18th, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. 172.0.0.1 - - [19/Jun/2018:14:33:19 +1000] (docker-registry.example.com:5000 -> 127.0.0.1:5001) "GET /v2/ HTTP/1.1" 401 113 "-" "docker/18.03.0-ce go/go1.9.4 git-commit/0520e24 kernel/3.10.0-693.17.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/18.03.0-ce x5C(linuxx5C))" "-"
  2. 172.0.0.1 - - [19/Jun/2018:14:33:19 +1000] (docker-registry.example.com:443 -> 127.0.0.1:8081) "GET /v2/token?scope=repository%3Acentos%3Apush%2Cpull&service=https%3A%2F%2Fdocker-registry.example.com%2Fv2%2Ftoken HTTP/1.1" 404 2013 "-" "docker/18.03.0-ce go/go1.9.4 git-commit/0520e24 kernel/3.10.0-693.17.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/18.03.0-ce x5C(linuxx5C))" "-"
  3. 172.0.0.1 - - [19/Jun/2018:14:33:19 +1000] (docker-registry.example.com:443 -> 127.0.0.1:8081) "GET /v2/token?scope=repository%3Acentos%3Apush%2Cpull&service=https%3A%2F%2Fdocker-registry.example.com%2Fv2%2Ftoken HTTP/1.1" 404 2013 "-" "docker/18.03.0-ce go/go1.9.4 git-commit/0520e24 kernel/3.10.0-693.17.1.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/18.03.0-ce x5C(linuxx5C))" "-"
  4.  
  5. 172.0.0.1 - - [19/Jun/2018:14:34:17 +1000] (docker-registry.example.com:5000 -> 127.0.0.1:5001) "GET /v2/token?scope=repository%3Acentos%3Apush%2Cpull&service=https%3A%2F%2Fdocker-registry.example.com%2Fv2%2Ftoken HTTP/1.1" 200 60 "-" "curl/7.29.0" "-"
  6.  
  7. +---------------+
  8. +----> Nexus |
  9. +--------+ +---------+ | +---------------+
  10. | | | | |
  11. | Client +---------> Nginx +------+
  12. | | | | |
  13. +--------+ +---------+ | +---------------+
  14. +---->Docker registry|
  15. +---------------+
  16.  
  17. upstream docker {
  18. server 127.0.0.1:5001;
  19. }
  20.  
  21. server {
  22. listen 5000 ssl;
  23. server_name docker-registry.example.com;
  24.  
  25. ssl_certificate /etc/nginx/ssl/docker_nexus.crt;
  26. ssl_certificate_key /etc/nginx/ssl/docker_nexus.key;
  27.  
  28. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  29. ssl_ciphers HIGH:!aNULL:!MD5;
  30.  
  31. location / {
  32. proxy_set_header Host $host;
  33. proxy_set_header X-Forwarded-Proto $scheme;
  34. proxy_set_header X-Real-IP $remote_addr;
  35. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  36.  
  37. proxy_pass http://docker;
  38. }
  39. }
  40.  
  41. upstream nexus {
  42. server 127.0.0.1:8081;
  43. }
  44.  
  45. server {
  46. listen 443 ssl;
  47. server_name docker-registry.example.com;
  48.  
  49. ssl_certificate /etc/nginx/ssl/docker_nexus.crt;
  50. ssl_certificate_key /etc/nginx/ssl/docker_nexus.key;
  51.  
  52. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  53. ssl_ciphers HIGH:!aNULL:!MD5;
  54.  
  55. location / {
  56. proxy_set_header Host $host;
  57. proxy_set_header X-Forwarded-Proto $scheme;
  58. proxy_set_header X-Real-IP $remote_addr;
  59. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  60.  
  61. proxy_pass http://nexus;
  62. }
  63. }
Add Comment
Please, Sign In to add comment