tomcat/Apathe 项目外部部署

1.tomcat  conf/Server.xml中配置:

 <Service name="monitor">
    <Connector port="100" 
    	         maxHttpHeaderSize="8192"
               maxThreads="200" 
               minSpareThreads="25" 
               maxSpareThreads="75"
               enableLookups="false" 
               redirectPort="8443" 
               acceptCount="100"
               connectionTimeout="20000" 
               disableUploadTimeout="true" />
    <Connector port="8009" 
    	       enableLookups="false" 
    	       redirectPort="8443" 
    	       protocol="AJP/1.3" />
    <Engine name="monitor" 
            defaultHost="monitorhost">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>
      <Host name="monitorhost" 
      	    appBase="E:/monitor/apps/webapps1"
            unpackWARs="true" 
            autoDeploy="true"
            xmlValidation="false" 
            xmlNamespaceAware="false">
      </Host>
    </Engine>
  </Service>

 2.Apache conf/httpd.cfg    (apathe 发布、运行静态web效果比较好)

Alias /icons/ "E:/monitor/Apache2/icons/"

<Directory "E:/monitor/Apache2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


Alias /pic "E:/monitor/apps/www/pic" 
   <Directory "E:/monitor/apps/www/pic"> 
     #列出目录
     #Options Indexes MultiViews 
     #不列出目录
     Options MultiViews 
     #增加支持SSI命令的插件功能
     Options Includes 
     #功能插件所作用的文件类型
     AddOutputFilter Includes shtml
     AllowOverride all 
     Order Allow,Deny
     Allow from all
   </Directory> 

Alias /movie "E:/monitor/apps/www/movie" 
   <Directory "E:/monitor/apps/www/movie"> 
     #列出目录
     #Options Indexes MultiViews 
     #不列出目录
     Options MultiViews 
     #增加支持SSI命令的插件功能
     Options Includes 
     #功能插件所作用的文件类型
     AddOutputFilter Includes shtml
     AllowOverride all 
     Order Allow,Deny
     Allow from all
   </Directory> 

 

你可能感兴趣的:(apache,tomcat,xml,Web)