测试方法:

ping 127.0.0.1

ping localhost

解决方案:

vi /etc/hosts

把127.0.0.1和wshCentOS绑定就好

centOS7启动apache,报错Caused by: java.net.UnknownHostException: wshCentOS:-LMLPHP

按 i 进入修改模式,按 esc 退出修改模式;

输入   :wq    退出;

在用如下命令测试下:

centOS7启动apache,报错Caused by: java.net.UnknownHostException: wshCentOS:-LMLPHP

05-26 22:27