Welcome! Log In Create A New Profile

Advanced

Reverse proxy

Posted by Jagannath Bilgi via nginx 
Jagannath Bilgi via nginx
Reverse proxy
September 04, 2018 08:20PM
Hi All,
New to nginx and reverse proxies. Trying to setup reserves proxy using nginx and docker. Have defined upstream in nginx config and created dependency in docker-compose as well. However getting time out error. 
Attached docker-compose and nginx.conf file for reference. Below is the error message. 
Note: However able to get the pages using below links http://178.128.159.51:81http://178.128.159.51:82http://178.128.159.51:83http://178.128.159.51:100/login 2018/09/02 13:29:20 [error] 10#10: *1 upstream timed out (110: Connection timed out) while connecting to upstream, client: 103.252.27.57, server: , request: "GET / HTTP/1.1", upstream: "http://178.128.159.51:81/";, host: "178.128.159.51"2018/09/02 13:30:21 [error] 10#10: *1 upstream timed out (110: Connection timed out) while connecting to upstream, client: 103.252.27.57, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://178.128.159.51:81/favicon.ico";, host: "178.128.159.51", referrer: "http://178.128.159.51/";
2018/09/02 13:30:50 [error] 12#12: *6 upstream timed out (110: Connection timed out) while connecting to upstream, client: 103.252.27.57, server: , request: "GET /topic HTTP/1.1", upstream: "http://178.128.159.51:82/";, host: "178.128.159.51"
2018/09/02 13:32:07 [error] 7#7: *9 upstream timed out (110: Connection timed out) while connecting to upstream, client: 103.252.27.57, server: , request: "GET /wb HTTP/1.1", upstream: "http://178.128.159.51:100/login";, host: "178.128.159.51"
2018/09/02 13:35:21 [error] 8#8: *14 upstream timed out (110: Connection timed out) while connecting to upstream, client: 103.252.27.57, server: , request: "GET /admin HTTP/1.1", upstream: "http://178.128.159.51:83/";, host: "178.128.159.51"

Please advise what i am missing.
Thanks and regards

Jagannath S Bilgi
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - nginx.conf (1.7 KB)
open | download - docker-compose.yml (1 KB)
tokers
Re: Reverse proxy
September 05, 2018 04:30AM
Hello!

Have you tried to detect the network interconnection
between these dockers?

The default proxy connect timeout is 60s, it’s large enough,
this problem should not be issued by Nginx itself.

Best Regards
Alex Zhang
https://github.com/tokers
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login