`

resin 3.1 配置

阅读更多
<!--  Resin 3.1 配置文件. -->   
<resin xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core">   
  <!-- 加载resin/lib下的所有.jar文件-->   
  <class-loader>   
    <tree-loader path="${resin.home}/lib"/>   
    <tree-loader path="${resin.root}/lib"/>   
  </class-loader>   
  <!--  管理配置 -->   
  <management path="${resin.root}/admin">   
  </management>   
  <!--   JDK日志接口的配置.   -->   
  <log name="" path="stdout:" timestamp="[%H:%M:%S.%s] "/>   
  <!-- 日志信息的级别:'info' 生产环境  'fine' 开发环境 'finer' 调试环境 -->   
  <logger name="com.caucho" level="info"/>   
  <logger name="com.caucho.java" level="config"/>   
  <logger name="com.caucho.loader" level="config"/>   
  <!--  环境上下文的检测时间,对于生产站点, 这个要设置长一点,例如600秒,10分钟  -->   
  <dependency-check-interval>2s</dependency-check-interval>   
  <!--      发送邮件通知的SMTP服务器     -->   
  <system-property mail.smtp.host="127.0.0.1"/>   
  <system-property mail.smtp.port="25"/>   
  <!--      你可以把编译器改成 "javac", "eclipse" 或者 "internal".    -->   
  <javac compiler="internal" args="-source 1.5"/>   
   
  <!-- Security providers. -->   
      <security-provider>   
         com.sun.net.ssl.internal.ssl.Provider   
      </security-provider>   
   
  <!-- 去掉注释,如果你使用resin提供的xml应用 -->   
         
      <system-property javax.xml.parsers.DocumentBuilderFactory   
                      ="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>   
      <system-property javax.xml.parsers.SAXParserFactory   
                      ="com.caucho.xml.parsers.XmlSAXParserFactory"/>   
     
  <cluster id="app-tier">   
    <!-- 设置集群上下文的根, 相对于server.root -->   
    <root-directory>.</root-directory>   
    <server-default>   
      <!-- HTTP服务的端口-->   
      <http address="*" port="8080"/>   
      <!-- SSL端口配置: -->   
             
          <http address="*" port="8443">   
            <openssl>   
              <certificate-file>keys/gryffindor.crt</certificate-file>   
              <certificate-key-file>keys/gryffindor.key</certificate-key-file>   
              <password>test123</password>   
            </openssl>   
          </http>   
          
      <!--          JVM参数设置        -->   
      <jvm-arg>-Xmx256m</jvm-arg>   
      <jvm-arg>-Xss1m</jvm-arg>   
      <jvm-arg>-Xdebug</jvm-arg>   
      <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>   
      <!-- Uncomment to enable admin heap dumps 去掉这个如果你想管理内存堆的倾倒 -->   
          <jvm-arg>-agentlib:resin</jvm-arg>   
   
      <watchdog-arg>-Dcom.sun.management.jmxremote</watchdog-arg>   
      <!--   强制resin强制重起时的最小空闲内存    -->   
      <memory-free-min>1M</memory-free-min>   
      <!-- 最大线程数量. -->   
      <thread-max>256</thread-max>   
      <!--  套接字等待时间 -->   
      <socket-timeout>65s</socket-timeout>   
      <!-- 配置 keepalive -->   
      <keepalive-max>128</keepalive-max>   
      <keepalive-timeout>15s</keepalive-timeout>   
      <!--          如果使用的是UNIX,这里是启动的帐号和用户组. -->   
          <user-name>resin</user-name>   
          <group-name>resin</group-name>   
         
    </server-default>   
    <!-- 定义群集服务器 -->   
    <server id="" address="127.0.0.1" port="6800"/>   
    <!--    Configures the persistent store for single-server or clustered 配置独立服务器或者群集的持久化存储,专业版的功能    -->   
    <resin:if test="${resin.isProfessional()}">   
      <persistent-store type="cluster">   
        <init path="session"/>   
      </persistent-store>   
    </resin:if>   
    <!--   为了安全, 你可以为SSL会话(SSL sessions)定义一个不同的cookie. -->   
        <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>   
       
    <!--  缓存启用 (专业版的功能)   -->   
    <resin:if test="${isResinProfessional}">   
      <cache path="cache" memory-size="64M">   
        <!-- Vary header rewriting for IE -->   
        <rewrite-vary-as-private/>   
      </cache>   
    </resin:if>   
    <!-- 启用周期性的服务器状态检查和死锁检查,所有的服务器可以添加 <url> 来检查。  -->   
    <resin:if test="${isResinProfessional}">   
      <ping>   
        <!-- <url>http://localhost:8080/test-ping.jsp</url> -->   
      </ping>   
    </resin:if>   
    <!-- 包含web应用的默认行为  -->   
    <resin:import path="${resin.home}/conf/app-default.xml"/>   
    <!-- 每一个web应用的默认参数  -->   
    <web-app-default>   
      <!-- 扩展库的公共jar文件,扩展是安全的即使没有类装载器知道的jars,装载的类将为每个应用分别装载,也就是这些类都是不同的 -->   
      <class-loader>   
        <tree-loader path="${server.root}/ext-webapp"/>   
      </class-loader>   
      <!--  设置缓存页、静态也的延时值  -->   
      <cache-mapping url-pattern="/" expires="5s"/>   
      <cache-mapping url-pattern="*.gif" expires="60s"/>   
      <cache-mapping url-pattern="*.jpg" expires="60s"/>   
      <cache-mapping url-pattern="*.png" expires="60s"/>   
      <!-- 启用EL表达式 -->   
      <allow-servlet-el/>   
      <!--   安全原因, 默认禁用了会话的URLs -->   
      <session-config>   
        <enable-url-rewriting>false</enable-url-rewriting>   
      </session-config>   
      <!-- 安全原因, 在cookies中设置HttpOnly标志 -->   
          <cookie-http-only/>   
             
      <!--一些JSP包有不正确的 .tld文件。可以把validate-taglib-schema设置成false,可能继续正常工作 Some JSP packages have incorrect .tld files.  It's possible to set validate-taglib-schema to false to work around these packages. -->   
        <jsp>   
          <validate-taglib-schema>true</validate-taglib-schema>   
          <fast-jstl>true</fast-jstl>   
          <fast-jsf>true</fast-jsf>   
        </jsp>   
    </web-app-default>   
    <!-- 简单的数据池配置 -->   
        The JDBC name is java:comp/env/jdbc/test   
         <database>   
           <jndi-name>jdbc/mysql</jndi-name>   
           <driver type="org.gjt.mm.mysql.Driver">   
             <url>jdbc:mysql://localhost:3306/test</url>   
             <user></user>   
             <password></password>   
            </driver>   
            <prepared-statement-cache-size>8</prepared-statement-cache-size>   
            <max-connections>20</max-connections>   
            <max-idle-time>30s</max-idle-time>   
          </database>   
             
    <!-- 定义所有虚拟主机的默认配置 -->   
    <host-default>   
      <!-- 如果和别的web服务器整合,这个可以被去掉,因为web服务器也可以记录这些信息。  -->   
      <access-log path="logs/access.log" format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period="1W"/>   
      <!-- war 文件的布置目录  -->   
      <web-app-deploy path="webapps"/>   
      <!-- ear文件的布置目录 -->   
      <ear-deploy path="deploy">   
        <ear-default>   
          <ejb-server>   
            <config-directory>WEB-INF</config-directory>   
            <data-source>jdbc/test</data-source>   
          </ejb-server>   
        </ear-default>   
      </ear-deploy>   
      <!-- rar文件的布置目录 -->   
      <resource-deploy path="deploy"/>   
    </host-default>   
    <!-- 虚拟主机的布置目录 -->   
    <host-deploy path="hosts">   
      <host-default>   
        <resin:import path="host.xml" optional="true"/>   
      </host-default>   
    </host-deploy>   
    <!-- 默认的虚拟主机配置 -->   
    <host id="" root-directory=".">   
      <!-- 配置默认的应用 webapp's ROOT        -->   
      <web-app id="/" root-directory="webapps/ROOT"/>   
      <web-app id="/resin-admin" root-directory="${resin.home}/php/admin">   
        <!--  管理应用程序 /resin-admin password is the md5 hash of the password。md5码的密码。 localhost is true to limit access to the localhost。localhost设置成true,这样只有localhost才能访问 -->   
        <prologue>   
          <resin:set var="resin_admin_user" value=""/>   
          <resin:set var="resin_admin_password" value=""/>   
          <resin:set var="resin_admin_external" value="false"/>   
        </prologue>   
      </web-app>   
    </host>   
  </cluster>   
  <!--  Configuration for the web-tier/load-balancer  -->   
  <resin:if test="${resin.isProfessional()}">   
    <cluster id="web-tier">   
      <server-default>   
        <!-- The http port -->   
        <http address="*" port="9080"/>   
      </server-default>   
      <server id="web-a" address="127.0.0.1" port="6700"/>   
      <cache path="cache" memory-size="64M"/>   
      <host id="">   
        <web-app id="/">   
           <rewrite-dispatch>   
             <load-balance regexp="" cluster="app-tier"/>   
           </rewrite-dispatch>   
        </web-app>   
      </host>   
    </cluster>   
  </resin:if>   
</resin>   

 

分享到:
评论

相关推荐

    Resin 3.1 配置文件.txt

    对resin里的主要配置进行了一些解释说明,帮您更好的了解resin,配置resin

    Resin 3.1 配置文件跟大家认识一下

    resin一个服务器,认识里面每一个说什么,不用求人

    resin3.1的配置文件说明.doc

    技术分享:resin3.1的配置文件说明

    resin3.1安装包&中文说明配置文件

    resin3.1安装包&中文说明配置文件。 官方说明如下: Resin’s Java EE certified architecture is cloud-enabling. You can choose to have Resin power your SaaS application or utilize it as the backbone of ...

    resin_3.1中文配置手册.doc

    resin_3.1中文配置 手册很详细 要学习的朋友可以了解一下

    系统安全配置技术规范-resin(基线加固)

    人工评估(手工检查)是对工具评估的一种补充, 它不需要在被评估目标系统上安装任何软件,对目标系统的运行和状态没有任何影响,在不允许安装软件进行检查的重要主机上显得非常有用。安全专家对各主机系统、服务器、...

    关于resion3.1.6版本在Eclipse3.2中的配置

    关于resin3.1.6版本在Eclipse3.2中的配置 无插件版 详细说明的开发设置,无插件配置。 很正确,我调试成功了,我也是累的要死找这个东西。可网上说得我头都大了,都是抄来抄去。 如果你是resin新手,看看吧!为...

    Linux运维从入门到高级全套案例v3

    5.3. 5 Resin多实例配置 89 5. 4 Nginx Tomcat动静分离 90 5. 5 LNAMP高性能架构配置 92 5. 6 构建DNS域名解析服务器 99 5. 7 MySQL主从高可用架构 102 5. 8 LVS+Keepalived负载均衡 110 5. 9 Squid缓存服务器配置 ...

    基于 JSP+JAVABEAN+MYSQL的新闻发布系统

    2. 项目具有详细的开发文档说明,环境配置说明,亲测可运行。 3. 系统说明 3.1 系统介绍 本系统分两部分管理,前台用于文章发布和用户文章发表,后台有管理员审核和不同权限的用户管理,具有高稳定性和安全性。整个站的...

    JSP实践之旅.exe

    Tomcat.JSP JSWDK环境安装与配置 Resin服务器平台介绍 Resin在IIS中的安装配置 JRun2.3平台介绍 Unify eWave ServletExec WebSphere应用服务器 在Windows2000上安装Apache+ApacheJserv+gnujsp...

    Spring-Reference_zh_CN(Spring中文参考手册)

    2.2.1. 更简单的XML配置 2.2.2. 新的bean作用域 2.2.3. 可扩展的XML编写 2.3. 面向切面编程(AOP) 2.3.1. 更加简单的AOP XML配置 2.3.2. 对@AspectJ 切面的支持 2.4. 中间层 2.4.1. 在XML里更为简单的声明性事务配置 ...

    JDBC 3.0数据库开发与设计

    2.3.4 Resin的安装与配置 2.4 Java开发环境 2.4.1 JDK设置 2.4.2 JBuilder的配置 2.4.3 Cafe的配置 2.4.4 JDeveloper的配置 2.4.5 FORTE FOR JAVA简介 2.5 JDBC开发调试技巧 2.6 本章小结 第3章 JDBC3.0 ...

    Windows 2003 IIS 6.0 搭建可建虚拟机的asp+.net+php+jsp+mysql+mssql

    3.1、安装JAVA 2 SDK我装在D:\JDK目录下。接下来设置环境变量,这一步很重要,别忘了:JAVA_HOME = D:\JDKCLASSPATH = D:\JDK\LIB\tools.jar;D:\JDK\LIB\dt.jarPath 追加D:\JDK;D:\JDK\bin3.2、安装jsp/Servl

    OPhone应用开发权威指南(黄晓庆)

    2.1.4 安装和配置ODT插件 14 2.2 第一个OPhone应用程序 16 2.2.1 新建OPhone项目 16 2.2.2 运行OPhone项目 18 2.2.3 更新资源文件 21 2.3 调试OPhone应用程序 24 2.3.1 设置断点 25 2.3.2 启动调试 25 2.3.3 单步...

Global site tag (gtag.js) - Google Analytics