美国云服务器server引入子文件配置,在配置tomcat虚拟主机时候,如何每一个虚拟主机写成单独文件,server.xml包含这些子文件? 如以下《OneinStack》中,添加JAVA环境虚拟主机后tomcat配置文件详情:
/usr/local/tomcat/conf/server.xml
]>
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
protocol="org.apache.coyote.http11.Http11AprProtocol"
connectionTimeout="20000"
redirectPort="8443"
maxThreads="1000"
minSpareThreads="20"
acceptCount="1000"
debug="0"
disableUploadTimeout="true"
useBodyEncodingForURI="true"
enableLookups="false"
URIEncoding="UTF-8" />
resourceName="UserDatabase"/>
&localhost-vhost;
&java.enuoidc.com-vhost;
&demo.enuoidc.com-vhost;
注:在元素前添加如下格式:
]>
并在...下面是每个单独虚拟主机文件:
/usr/local/tomcat/conf/vhost/localhost.xml
prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" />
/usr/local/tomcat/conf/vhost/demo.enuoidc.com.xml
prefix="demo.enuoidc.com_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" />
/usr/local/tomcat/conf/vhost/java.enuoidc.com.xml
java1.enuoidc.com
prefix="java.enuoidc.com_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" />
购买使用一诺网络美国云服务器,可以极大降低初创企业、中小企业以及个人开发者等用户群体的整体IT使用成本,无需亲自搭建基础设施、简化了运维和管理的日常工作量,使用户能够更专注于自身的业务发展和创新。美国云服务器低至49元/月,购买链接:https://www.enuoidc.com/vpszq.html?typeid=3