有个系统有多个服务,我在一个服务中通过curl调用另一个服务的接口 无法访问?
有商城服务(shop.localhost)和用户中心服务(ucenter.localhost)
我在 商城服务中 通过curl 调用 用户中心服务的接口 提示 Could not resolve host: ucenter.localhost 这种应该怎么解决呢?以上都是本地的服务
域名就是叫ucenter.localhost这个吗?是的话换成正常的域名吧。比如 ucenter.localhostaaaaa.com这种。可能得原因就是curl会检测域名是不是正常的域名