Advertisement
Guest User

Untitled

a guest
May 30th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. location ~ ^/(.+)$ {
  2. set $backend "http://$1:80";
  3. proxy_pass $backend;
  4. }
  5.  
  6. [error] 7741#0: *1 no resolver defined to resolve http://myservice
  7.  
  8. location ~ ^/(.+)$ {
  9. resolver 127.0.0.1:53;
  10. set $backend "http://$1:80";
  11. proxy_pass $backend;
  12. }
  13.  
  14. [error] 9#9: *734 myservice could not be resolved (2: Server failure), client: 127.0.0.1, server: nginx-proxy, request: "GET /myservice HTTP/1.1", host: "localhost:8080"
  15. 127.0.0.1 - xxx [30/May/2016:10:34:23 +0000] "GET /myservice HTTP/1.1" 502 173 "-" "curl/7.38.0" "-"
  16.  
  17. spec:
  18. containers:
  19. - name: nginx
  20. image: "nginx:1.10.0"
  21. ports:
  22. - containerPort: 8080
  23. name: "external"
  24. protocol: "TCP"
  25. - name: dnsmasq
  26. image: "janeczku/go-dnsmasq:release-1.0.5"
  27. args:
  28. - --listen
  29. - "0.0.0.0:53"
  30.  
  31. Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
  32. tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN -
  33. tcp 0 0 :::53 :::* LISTEN 1/go-dnsmasq
  34.  
  35. Starting Nmap 6.47 ( http://nmap.org ) at 2016-05-30 10:33 UTC
  36. Nmap scan report for localhost (127.0.0.1)
  37. Host is up (0.00055s latency).
  38. Other addresses for localhost (not scanned): 127.0.0.1
  39. Not shown: 1997 closed ports
  40. PORT STATE SERVICE
  41. 53/tcp open domain
  42. 8080/tcp open http-proxy
  43. 53/udp open domain
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement