Tomcat去除项目名称和端口号
1. 去除端口号
将端口设为80:
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="GBK"/>
2. 去除项目名称
项目默认部署在webapps目录下,将项目拷出,放在与webapps同级的目录下,配置如下:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
[b] <Context path="" docBase="${catalina.home}/lpip" debug="0"/> [/b]
</Host>
例如要部署的项目名称是“lpip”,你这样访问了,http://ip/ tomcat管理页面http://ip/manager/html
1. 去除端口号
将端口设为80:
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="GBK"/>
2. 去除项目名称
项目默认部署在webapps目录下,将项目拷出,放在与webapps同级的目录下,配置如下:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html -->
[b] <Context path="" docBase="${catalina.home}/lpip" debug="0"/> [/b]
</Host>
例如要部署的项目名称是“lpip”,你这样访问了,http://ip/ tomcat管理页面http://ip/manager/html