请教:不能访问通过IP访问,却可以通过机器名访问

某一台服务器不能访问通过IP访问,却可以通过机器名访问,怎样设置才能通过IP访问此网页呢?谢谢

补充:
1.可以正常访问http://localhost:8080/test,但将localhost改为127.0.0.1却不可以访问。
也不可以访问http://192.168.6.10:8080/test
2.host文件里有以下设置
127.0.0.1      localhost
127.0.0.1      testPJ.com.cn

原文地址:https://www.cnblogs.com/Snowfun/p/2220404.html