void

          Resin3.1下resin.conf配置文件說明

          <!-- - Resin 3.1 配置文件. -->
          <resin xmlns="        xmlns:resin="

          <!-- 加載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應用的默認參數 -->
              <<SPAN class=hilite1>web-app-default</SPAN>>
              <!-- 擴展庫的公共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>
               </<SPAN class=hilite1>web-app-default</SPAN>>

               <!-- 簡單的數據池配置
                  - 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>

          posted on 2008-07-19 12:26 void 閱讀(902) 評論(0)  編輯  收藏 所屬分類: Resin


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 观塘区| 西和县| 巴林左旗| 南开区| 延安市| 广昌县| 乡城县| 宁德市| 寻甸| 游戏| 江孜县| 本溪市| 扎鲁特旗| 云阳县| 大化| 安西县| 淳化县| 从江县| 民勤县| 静宁县| 宜章县| 丹江口市| 阳东县| 沅江市| 六安市| 峨山| 偃师市| 监利县| 上高县| 鄂托克旗| 富宁县| 壤塘县| 象山县| 南投市| 全南县| 琼结县| 抚宁县| 金华市| 封丘县| 巩义市| 镇康县|