Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPSTREAM difficult to get right #37

Open
Mugane opened this issue Oct 6, 2022 · 0 comments
Open

UPSTREAM difficult to get right #37

Mugane opened this issue Oct 6, 2022 · 0 comments

Comments

@Mugane
Copy link

Mugane commented Oct 6, 2022

I was unable to get the proxy pass working with my app container until I added the service to my existing docker-compose.yml and specified the app service name as the UPSTREAM: target (where target is the name of the docker container that is running the proxied app. Not 127.0.0.1, the local IP, LAN IP, nor even the docker IP that is randomly generated worked. Perhaps the network needs to be specified in the docker-compose.yml service description, perhaps there is some other nuance. None of this is documented.

The error I was getting was 502: Bad gateway

Docker logs on app were empty, logs on proxy read something like (I have obscured actual domains):

2022/10/06 19:03:13 [error] 145#145: *28 connect() failed (113: No route to host) while connecting to upstream, client: [redacted_request_ip], server: [redacted_domain], request: "GET / HTTP/2.0", upstream: "http://[redacted_lan_ip]:[redacted_app_port]/", host: "[redacted_domain]"
[redacted_request_ip] - - [06/Oct/2022:19:03:13 +0000] "GET / HTTP/2.0" 502 552 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/104.0.5112.101 Safari/537.36" "-"
10.0.18.17 - - [06/Oct/2022:19:03:23 +0000] "\x16\x03\x01\x00\xA3\x01\x00\x00\x9F\x03\x03\xDE\xBE\xD8ho" 400 150 "-" "-" "-"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant