1、从官网上下载tomcat7.0版本,部署在服务器上,修改端口号为8280,在服务器上输入网址测试:http://localhost:8280或者http://ip:8280,返回异常
![[no address given] and inform them of the](https://exp-picture.cdn.bcebos.com/89402670d5413a8c2ecb28bb1ffc508c9ace811b.jpg)
![[no address given] and inform them of the](https://exp-picture.cdn.bcebos.com/5c9c964ce54a2f27742ca5b2e00192dd3240f41b.jpg)
2、在服务器上输入:http://127.0.0.1:8280,返回正常
![[no address given] and inform them of the](https://exp-picture.cdn.bcebos.com/3201a8f39187031c020322486a86242fa972ec1b.jpg)
3、同一局域网内,其他电脑访问,正常
![[no address given] and inform them of the](https://exp-picture.cdn.bcebos.com/256eb672941fbee496197deac1237971ff1de71b.jpg)
4、经过上述情况反馈,应该是服务器系统本身的配置问题导致,经过一些资料的查找,原来需要修改hosts文件
![[no address given] and inform them of the](https://exp-picture.cdn.bcebos.com/ff5c88d8181961200d0e81da70f202b374d7df1b.jpg)
5、默认情况下hosts中的配置如下:# 127.0.0.1 localhost改行是给注释掉的,但在服务器上,该注释没有,分析报错的提示,应该是IP没有授权,故在下面在增加一个配置127.0.0.1 IP #中间用TAB键隔开
6、设置好以后重启系统,在重新测试http://localhost:8280或者http://ip:8280,tomcat返回正常,部署在下面的服务也能正常工作
![[no address given] and inform them of the](https://exp-picture.cdn.bcebos.com/7496877bbbf4da58c01953fdea0f8b56ac04d71b.jpg)
![[no address given] and inform them of the](https://exp-picture.cdn.bcebos.com/ac45306817e951e1b43bd5e25e3da824d9e9cf1b.jpg)
7、一般情况下,tomcat部署在服务器上后,服务器不需要浏览器调用访问,凑巧本案例是在tomcat上部署了一个webserv足毂忍珩ice服务,同时在服务器上又放置了一个调用webservice的中转程序,这就导致了这个异常不解决,那个中转程序无法使用,一个小配置,大家多注意吧