标签:style blog http io color ar os sp div
tomcat-users.xml(在%tomcat%/conf目录下)下添加
<tomcat-users> <role rolename="manager"/> <role rolename="manager-gui"/> <role rolename="admin"/> <role rolename="admin-gui"/> <role rolename="manager-script"/> <role rolename="manager-jmx"/> <role rolename="manager-status"/> <user username="admin" password="admin" roles="admin-gui,admin,manager-gui,manager,manager-script,manager-jmx,manager-status"/> </tomcat-users>
server.xml
//同一局域网下访问这样就可以了 最好关闭本地防火墙 //如果要外网访问 路由器---转发规则---虚拟服务器---添加行条目
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> //默认端口8080-->80(本地 避免每次访问输入端口) <Engine name="Catalina" defaultHost="192.168.0.159"> //localhost-->映射自己ip(192.168.0.159) <Host name="192.168.0.159" appBase="webapps" unpackWARs="true" autoDeploy="true"></Host> <Context path="test" docBase="/runtong" reloadable="true" crossContext="true"></Context> //path访问的虚拟路径 docBase实际项目路径 path=""可留空
标签:style blog http io color ar os sp div
原文地址:http://www.cnblogs.com/manusas/p/4045064.html