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

I cant connect guzzle with multile pojects #3196

Open
murilolivorato opened this issue Apr 13, 2022 · 2 comments
Open

I cant connect guzzle with multile pojects #3196

murilolivorato opened this issue Apr 13, 2022 · 2 comments

Comments

@murilolivorato
Copy link

murilolivorato commented Apr 13, 2022

hello , if some one could help me . I wold appreciate so much .
I have been for 4 days , trying to connect .with guzzle on project in other like this -
I am using nginx with laradock .

   $client        = new Client(['verify' => false, 'verify_ssl' => false]);
        return $client->request('GET','http://my-project-api/api/options');

It shows this error -

GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: my-project-api

I saw this post -

#435

I could abstract some things from there , but as I dont have many experience with Docker . I could not understand some things .

In my /etc/hosts , I tried to change for -

127.0.0.1  my-project-api
or
172.19.0.1 my-project-api
( I got this IP inspecting the  nginx container  , I found there - "Gateway": "172.19.0.1"  . I can access by postman and in chrome , but not with Guzzle  ) 

or 
172.18.0.1 my-project-api
( I got this IP inspecting  - laradock_backend network , I found there - "Gateway": "172.18.0.1"  .  I can access by postman and in chrome , but not with Guzzle  ) 

I could not understand , other methods , like making alias to connect .
some one could explain to me with more details ?
Thanks

@murilolivorato
Copy link
Author

@lanphan

@gofunz
Copy link

gofunz commented Jun 23, 2022

@murilolivorato Hi, You can ref #435 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants