站长资讯网
最全最丰富的资讯网站

Linux系统Tomcat同个域名下添加站点实例分析

修改apache-tomcat-7.0.88/conf/server.xml,

在Service 后面添加一个Service 标签

   <Service name="Catalina2">        <Connector port="8081" protocol="HTTP/1.1"                 connectionTimeout="20000"                 redirectPort="8443" />           	 <Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />          <Engine name="Catalina" defaultHost="域名">                 <Realm className="org.apache.catalina.realm.LockOutRealm">          <!-- This Realm uses the UserDatabase configured in the global JNDI               resources under the key "UserDatabase".  Any edits               that are performed against this UserDatabase are immediately               available for use by the Realm.  -->          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"                 resourceName="UserDatabase"/>        </Realm>      	    	    	  <Host name="域名" appBase="webapps" unpackWARs="true" autoDeploy="true">  		<Context path="" docBase="网站所在目录" reloadable="true" >  	</Context>  	<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"   	prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />  	</Host>      	  	        </Engine>    </Service>
赞(0)
分享到: 更多 (0)
网站地图   沪ICP备18035694号-2    沪公网安备31011702889846号