|
@@ -0,0 +1,243 @@
|
|
|
+<!--
|
|
|
+ - Resin 3.1 configuration file.
|
|
|
+ -->
|
|
|
+<resin xmlns="http://caucho.com/ns/resin"
|
|
|
+ xmlns:resin="http://caucho.com/ns/resin/core">
|
|
|
+
|
|
|
+ <!-- adds all .jar files under the resin/lib directory -->
|
|
|
+ <class-loader>
|
|
|
+ <tree-loader path="${resin.home}/ext-lib"/>
|
|
|
+ <tree-loader path="${resin.root}/ext-lib"/>
|
|
|
+
|
|
|
+ <tree-loader path="${resin.home}/lib"/>
|
|
|
+ <tree-loader path="${resin.root}/lib"/>
|
|
|
+ </class-loader>
|
|
|
+
|
|
|
+ <management path="${resin.root}/admin">
|
|
|
+ <user name="admin" password="password" disable="true"/>
|
|
|
+
|
|
|
+ <resin:if test="${resin.professional}">
|
|
|
+ <deploy-service/>
|
|
|
+ <jmx-service/>
|
|
|
+ <log-service/>
|
|
|
+ <xa-log-service/>
|
|
|
+ </resin:if>
|
|
|
+ </management>
|
|
|
+
|
|
|
+
|
|
|
+ <log name="" level="info" path="stdout:"
|
|
|
+ timestamp="[%Y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
|
|
|
+ <log name='' level='fine' path='stderr:' timestamp="[%Y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
|
|
|
+
|
|
|
+ <logger name="com.caucho" level="info"/>
|
|
|
+
|
|
|
+ <logger name="com.caucho.java" level="config"/>
|
|
|
+ <logger name="com.caucho.loader" level="config"/>
|
|
|
+
|
|
|
+
|
|
|
+ <dependency-check-interval>2s</dependency-check-interval>
|
|
|
+
|
|
|
+ <javac compiler="internal" args="-source 1.6"/>
|
|
|
+
|
|
|
+ <cluster id="app-tier">
|
|
|
+ <!-- sets the content root for the cluster, relative to server.root -->
|
|
|
+ <root-directory>.</root-directory>
|
|
|
+ <server-header></server-header>
|
|
|
+ <server-default>
|
|
|
+ <!-- The http port -->
|
|
|
+ <http address="*" port="8080"/>
|
|
|
+
|
|
|
+
|
|
|
+ <jvm-arg>-server</jvm-arg>
|
|
|
+ <jvm-arg>-Xmx4096m</jvm-arg>
|
|
|
+ <jvm-arg>-Xms4096m</jvm-arg>
|
|
|
+ <jvm-arg>-Xmn1024m</jvm-arg>
|
|
|
+ <jvm-arg>-Xss1m</jvm-arg>
|
|
|
+ <jvm-arg>-XX:PermSize=128m</jvm-arg>
|
|
|
+ <jvm-arg>-XX:MaxPermSize=256m</jvm-arg>
|
|
|
+ <!--
|
|
|
+ <jvm-arg>-Xincgc</jvm-arg>
|
|
|
+ -->
|
|
|
+ <jvm-arg>-Xdebug</jvm-arg>
|
|
|
+ <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
|
|
|
+ <jvm-arg>-Djava.util.prefs.userRoot=/home/book/preps</jvm-arg>
|
|
|
+
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - arguments for the watchdog process
|
|
|
+ -->
|
|
|
+ <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
|
|
|
+ <watchdog-port>9600</watchdog-port>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Configures the minimum free memory allowed before Resin
|
|
|
+ - will force a restart.
|
|
|
+ -->
|
|
|
+ <memory-free-min>1M</memory-free-min>
|
|
|
+
|
|
|
+ <!-- Maximum number of threads. -->
|
|
|
+ <thread-max>2500</thread-max>
|
|
|
+
|
|
|
+ <!-- Configures the socket timeout -->
|
|
|
+ <socket-timeout>15s</socket-timeout>
|
|
|
+
|
|
|
+ <!-- Configures the keepalive -->
|
|
|
+ <keepalive-max>128</keepalive-max>
|
|
|
+ <keepalive-timeout>15s</keepalive-timeout>
|
|
|
+
|
|
|
+
|
|
|
+ </server-default>
|
|
|
+
|
|
|
+ <!-- define the servers in the cluster -->
|
|
|
+ <server id="" address="127.0.0.1" port="6800" load-balance-socket-timeout="600s"/>
|
|
|
+
|
|
|
+ <resin:if test="${resin.professional}">
|
|
|
+ <persistent-store type="cluster">
|
|
|
+ <init path="session"/>
|
|
|
+ </persistent-store>
|
|
|
+ </resin:if>
|
|
|
+
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Enables the cache (available in Resin Professional)
|
|
|
+ -->
|
|
|
+ <resin:if test="${resin.professional}">
|
|
|
+ <cache path="cache" memory-size="64M">
|
|
|
+ <!-- Vary header rewriting for IE -->
|
|
|
+ <rewrite-vary-as-private/>
|
|
|
+ </cache>
|
|
|
+ </resin:if>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Enables periodic checking of the server status and
|
|
|
+ - check for deadlocks..
|
|
|
+ -
|
|
|
+ - All servers can add <url>s to be checked.
|
|
|
+ -->
|
|
|
+ <resin:if test="${resin.professional}">
|
|
|
+ <ping>
|
|
|
+ <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
|
|
|
+ </ping>
|
|
|
+ </resin:if>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Defaults applied to each web-app.
|
|
|
+ -->
|
|
|
+ <web-app-default>
|
|
|
+ <prologue>
|
|
|
+ <!--
|
|
|
+ - Extension library for common jar files. The ext is safe
|
|
|
+ - even for non-classloader aware jars. The loaded classes
|
|
|
+ - will be loaded separately for each web-app, i.e. the class
|
|
|
+ - itself will be distinct.
|
|
|
+ -->
|
|
|
+ <class-loader>
|
|
|
+ <tree-loader path="${resin.root}/ext-webapp-lib"/>
|
|
|
+ </class-loader>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Enable EL expressions in Servlet and Filter init-param
|
|
|
+ -->
|
|
|
+ <allow-servlet-el/>
|
|
|
+ </prologue>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Sets timeout values for cacheable pages, e.g. static pages.
|
|
|
+ -->
|
|
|
+ <cache-mapping url-pattern="/" expires="60m"/>
|
|
|
+ <cache-mapping url-pattern="/*.m" expires="60m"/>
|
|
|
+
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - for security, disable session URLs by default.
|
|
|
+ -->
|
|
|
+ <session-config>
|
|
|
+ <enable-url-rewriting>false</enable-url-rewriting>
|
|
|
+ <session-timeout>40</session-timeout>
|
|
|
+ <session-max>12000</session-max>
|
|
|
+ </session-config>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - For security, set the HttpOnly flag in cookies.
|
|
|
+ - <cookie-http-only/>
|
|
|
+ -->
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - 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>false</fast-jsf>
|
|
|
+ </jsp>
|
|
|
+ </web-app-default>
|
|
|
+
|
|
|
+ <!-- includes the app-default for default web-app behavior -->
|
|
|
+ <resin:import path="${resin.home}/conf/app-default.xml"/>
|
|
|
+
|
|
|
+ <!--
|
|
|
+ - Sample database pool configuration
|
|
|
+ -
|
|
|
+ - The JDBC name is java:comp/env/jdbc/test
|
|
|
+ -->
|
|
|
+
|
|
|
+ <database>
|
|
|
+ <jndi-name>jdbc/noveladmin</jndi-name>
|
|
|
+ <driver type="com.mysql.jdbc.Driver">
|
|
|
+ <url>jdbc:mysql://10.26.30.112:3306/noveladmin</url>
|
|
|
+ <user>wap.news</user>
|
|
|
+ <password>qazwsx</password>
|
|
|
+ </driver>
|
|
|
+ <prepared-statement-cache-size>20</prepared-statement-cache-size>
|
|
|
+ <max-connections>60</max-connections>
|
|
|
+ <max-idle-time>30s</max-idle-time>
|
|
|
+ <max-active-time>12h</max-active-time>
|
|
|
+ <max-pool-time>12h</max-pool-time>
|
|
|
+ </database>
|
|
|
+ <!--
|
|
|
+ - Default host configuration applied to all virtual hosts.
|
|
|
+ -->
|
|
|
+ <host-default>
|
|
|
+ <access-log path-format="/data/log/other/access_log.%Y-%m-%d.log"
|
|
|
+ format='%D %{xxx}c %h %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
|
|
|
+ rollover-period="1D"/>
|
|
|
+
|
|
|
+ <!-- creates the webapps directory for .war expansion -->
|
|
|
+ <web-app-deploy path="webapps"/>
|
|
|
+
|
|
|
+ <!-- creates the deploy directory for .ear expansion -->
|
|
|
+ <ear-deploy path="deploy">
|
|
|
+ <ear-default>
|
|
|
+ <ejb-server>
|
|
|
+ <config-directory>WEB-INF</config-directory>
|
|
|
+ </ejb-server>
|
|
|
+ </ear-default>
|
|
|
+ </ear-deploy>
|
|
|
+
|
|
|
+ <!-- creates the deploy directory for .rar expansion -->
|
|
|
+ <resource-deploy path="deploy"/>
|
|
|
+ </host-default>
|
|
|
+
|
|
|
+ <!-- configures a deployment directory for virtual hosts -->
|
|
|
+ <host-deploy path="hosts">
|
|
|
+ <host-default>
|
|
|
+ <resin:import path="host.xml" optional="true"/>
|
|
|
+ </host-default>
|
|
|
+ </host-deploy>
|
|
|
+
|
|
|
+ <!-- configures the default host, matching any host name -->
|
|
|
+ <host id="" root-directory=".">
|
|
|
+ <web-app id="/" character-encoding='UTF-8' document-directory="/data/project/ROOT" archive-path="/data/project/ROOT.war">
|
|
|
+ <stdout-log path="/data/log/devlog/stdout.log" rollover-period="1W"/>
|
|
|
+ <stderr-log path="/data/log/devlog/stderr.log" rollover-period='1W'/>
|
|
|
+ <access-log path="/data/log/novelweb/access.log"
|
|
|
+ format='%h"%{%Y-%m-%d %H:%M:%S}t"%r"%s"%b"%{esid}o"%{cid}o"%{X-Forwarded-For}i"%{mobile}o"%{ua}o"%{mid}o"%{did}o'
|
|
|
+ rollover-period="1D"/>
|
|
|
+ <jsp>
|
|
|
+ <dependency-check-interval>300s</dependency-check-interval>
|
|
|
+ </jsp>
|
|
|
+ </web-app>
|
|
|
+ </host>
|
|
|
+ </cluster>
|
|
|
+</resin>
|