LNMP,DNS设置无误,curl任意地址报错:
Couldn't resolve host 'example.com'
file_get_contents
报错:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
- shell 中直接
curl -I http://example.com
正常,ping也正常 - curl设置
CURL_IPRESOLVE_V4
无效
好吧...找到问题了,PHP运行在chroot环境中,关掉就好了。