linux tomcat 绑定域名
1、解析域名到对应的服务器ip
2、找到tomcat安装路径进入/conf
3、vi server.xml
4、修改<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
改为<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
5、在</host>后面加上
<Host name="域名" appBase="webapps/项目名(可不写)"
unpackWARs="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="." debug="0" reloadable="true"/>
</Host>
unpackWARs="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="." debug="0" reloadable="true"/>
</Host>
6、保存server.xml (esc :wq)
7、启动tomcat 就ok啦。