On my local machine I have two services (in laravel 5): userBox and mailBox. mailBox use userBox during login using library "guzzlehttp/guzzle": "~6.0"
and restful API (mailBox send user credential and get info do user exists and have proper access). After .dev subdomains stopps working I decide to use .localhost subdomain so i have:
userbox.localhost
mailbox.localhost
I make changes in /etc/apache2/extra/httpd-vhosts.conf
but unfortunatley I get error:
cURL error 6: Could not resolve host: userbox.localhost (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
So i look on internet and found solution: we just need add new subdomains to /etc/hosts
. After that old error was solved but new one appears:
ClientException in RequestException.php line 113: Client error:
GET http://userbox.localhost/api/v1/users/auth?username=test_manager%40example.com&password=xxxxxxx&MAILBOX_TOKEN=yyyyyyyyyyyyyyyyyyyyyyyyyyy
resulted in a404 Not Found
response: 404 Not Found Not Found (truncated...)
And I don't know how to solve it (link GET http://userbox... from aboce exception works in browser) - hovewer when I change userbox.localhost
to userbox.ddd
then everything works fine.
Question: Do you have any idea how why .localhost
subdomains not work with guzzle-curl
and what to do to make it works?