linux下面tomcat域名配置
?
connectionTimeout="20000"
? redirectPort="8443" URIEncoding="UTF-8"/>
2:复制下面的内容,到/conf/server.xml下面。
<Host name="配置的域名"? appBase="/home/temobi"
?? unpackWARs="true" autoDeploy="true">
??? ?
?? <!-- 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 -->
????? ?
?? <!--
?<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" ?
???????????? ?
????? prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
??????? -->
???? ?
</Host>
3:在/home/temobi下面新建一个ROOT文件夹,
4:将本地的tomcat下面的temobi工程中的内容copy到/home/temobi/ROOT文件夹下面。
5:将tomcat/webapps下面的host-manager文件夹和manager文件夹copy到/home/temobi文件夹下面。
好了,大功告成!
二、单域名配置
1:将默认的8080端口改成80,因为80是默认的网页端口。
<Connector port="8080" protocol="HTTP/1.1"
?
connectionTimeout="20000"
? redirectPort="8443" URIEncoding="UTF-8"/>
2:复制下面的内容,到/conf/server.xml下面。
<Host name="配置的域名"? appBase="webapps"
?? unpackWARs="true" autoDeploy="true">
??? ?
?? <!-- 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 -->
????? ?
?? <!--
?<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" ?
???????????? ?
????? prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
??????? -->
???? ?
</Host>
3:将tomcat/webapps/ROOT下面的内容删除,将本地的工程中的文件夹放入到tomcat/webapps/ROOT下面。
好了,大功告成!