I have a docker that works through docker-compose.yml

On one container there is an Nginx and several virtualhosts on it with sites

I'm trying to get to one site from another by REST API

When I make a request I get a error: cURL error 7: Failed to connect to myhost.lo port 80: Connection refused

If I make a request to name which not exists I get not the same error like "can't resolve site name" that means that site is available

If site that I want to reach with server side of API I put to another server without docker then client site can reach it without errors.

What could be a reason of this kind of error?

  • That's very unclear what the problem could be, probably a name resolution not going where you expect it to go, but without more details it's impossible to give a real answer. – Tensibai Mar 20 at 11:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.