resin.conf 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <!--
  2. - Resin 3.1 configuration file.
  3. -->
  4. <resin xmlns="http://caucho.com/ns/resin"
  5. xmlns:resin="http://caucho.com/ns/resin/core">
  6. <!-- adds all .jar files under the resin/lib directory -->
  7. <class-loader>
  8. <tree-loader path="${resin.home}/ext-lib"/>
  9. <tree-loader path="${resin.root}/ext-lib"/>
  10. <tree-loader path="${resin.home}/lib"/>
  11. <tree-loader path="${resin.root}/lib"/>
  12. </class-loader>
  13. <management path="${resin.root}/admin">
  14. <user name="admin" password="password" disable="true"/>
  15. <resin:if test="${resin.professional}">
  16. <deploy-service/>
  17. <jmx-service/>
  18. <log-service/>
  19. <xa-log-service/>
  20. </resin:if>
  21. </management>
  22. <log name="" level="info" path="stdout:"
  23. timestamp="[%Y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
  24. <log name='' level='fine' path='stderr:' timestamp="[%Y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
  25. <logger name="com.caucho" level="info"/>
  26. <logger name="com.caucho.java" level="config"/>
  27. <logger name="com.caucho.loader" level="config"/>
  28. <dependency-check-interval>2s</dependency-check-interval>
  29. <javac compiler="internal" args="-source 1.6"/>
  30. <cluster id="app-tier">
  31. <!-- sets the content root for the cluster, relative to server.root -->
  32. <root-directory>.</root-directory>
  33. <server-header></server-header>
  34. <server-default>
  35. <!-- The http port -->
  36. <http address="*" port="8080"/>
  37. <jvm-arg>-server</jvm-arg>
  38. <jvm-arg>-Xmx4096m</jvm-arg>
  39. <jvm-arg>-Xms4096m</jvm-arg>
  40. <jvm-arg>-Xmn1024m</jvm-arg>
  41. <jvm-arg>-Xss1m</jvm-arg>
  42. <jvm-arg>-XX:PermSize=128m</jvm-arg>
  43. <jvm-arg>-XX:MaxPermSize=256m</jvm-arg>
  44. <!--
  45. <jvm-arg>-Xincgc</jvm-arg>
  46. -->
  47. <jvm-arg>-Xdebug</jvm-arg>
  48. <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
  49. <jvm-arg>-Djava.util.prefs.userRoot=/home/book/preps</jvm-arg>
  50. <!--
  51. - arguments for the watchdog process
  52. -->
  53. <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
  54. <watchdog-port>9600</watchdog-port>
  55. <!--
  56. - Configures the minimum free memory allowed before Resin
  57. - will force a restart.
  58. -->
  59. <memory-free-min>1M</memory-free-min>
  60. <!-- Maximum number of threads. -->
  61. <thread-max>2500</thread-max>
  62. <!-- Configures the socket timeout -->
  63. <socket-timeout>15s</socket-timeout>
  64. <!-- Configures the keepalive -->
  65. <keepalive-max>128</keepalive-max>
  66. <keepalive-timeout>15s</keepalive-timeout>
  67. </server-default>
  68. <!-- define the servers in the cluster -->
  69. <server id="" address="127.0.0.1" port="6800" load-balance-socket-timeout="600s"/>
  70. <resin:if test="${resin.professional}">
  71. <persistent-store type="cluster">
  72. <init path="session"/>
  73. </persistent-store>
  74. </resin:if>
  75. <!--
  76. - Enables the cache (available in Resin Professional)
  77. -->
  78. <resin:if test="${resin.professional}">
  79. <cache path="cache" memory-size="64M">
  80. <!-- Vary header rewriting for IE -->
  81. <rewrite-vary-as-private/>
  82. </cache>
  83. </resin:if>
  84. <!--
  85. - Enables periodic checking of the server status and
  86. - check for deadlocks..
  87. -
  88. - All servers can add <url>s to be checked.
  89. -->
  90. <resin:if test="${resin.professional}">
  91. <ping>
  92. <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
  93. </ping>
  94. </resin:if>
  95. <!--
  96. - Defaults applied to each web-app.
  97. -->
  98. <web-app-default>
  99. <prologue>
  100. <!--
  101. - Extension library for common jar files. The ext is safe
  102. - even for non-classloader aware jars. The loaded classes
  103. - will be loaded separately for each web-app, i.e. the class
  104. - itself will be distinct.
  105. -->
  106. <class-loader>
  107. <tree-loader path="${resin.root}/ext-webapp-lib"/>
  108. </class-loader>
  109. <!--
  110. - Enable EL expressions in Servlet and Filter init-param
  111. -->
  112. <allow-servlet-el/>
  113. </prologue>
  114. <!--
  115. - Sets timeout values for cacheable pages, e.g. static pages.
  116. -->
  117. <cache-mapping url-pattern="/" expires="60m"/>
  118. <cache-mapping url-pattern="/*.m" expires="60m"/>
  119. <!--
  120. - for security, disable session URLs by default.
  121. -->
  122. <session-config>
  123. <enable-url-rewriting>false</enable-url-rewriting>
  124. <session-timeout>40</session-timeout>
  125. <session-max>12000</session-max>
  126. </session-config>
  127. <!--
  128. - For security, set the HttpOnly flag in cookies.
  129. - <cookie-http-only/>
  130. -->
  131. <!--
  132. - Some JSP packages have incorrect .tld files. It's possible to
  133. - set validate-taglib-schema to false to work around these packages.
  134. -->
  135. <jsp>
  136. <validate-taglib-schema>true</validate-taglib-schema>
  137. <fast-jstl>true</fast-jstl>
  138. <fast-jsf>false</fast-jsf>
  139. </jsp>
  140. </web-app-default>
  141. <!-- includes the app-default for default web-app behavior -->
  142. <resin:import path="${resin.home}/conf/app-default.xml"/>
  143. <!--
  144. - Sample database pool configuration
  145. -
  146. - The JDBC name is java:comp/env/jdbc/test
  147. -->
  148. <database>
  149. <jndi-name>jdbc/noveladmin</jndi-name>
  150. <driver type="com.mysql.jdbc.Driver">
  151. <url>jdbc:mysql://10.26.30.112:3306/noveladmin</url>
  152. <user>wap.news</user>
  153. <password>qazwsx</password>
  154. </driver>
  155. <prepared-statement-cache-size>20</prepared-statement-cache-size>
  156. <max-connections>60</max-connections>
  157. <max-idle-time>30s</max-idle-time>
  158. <max-active-time>12h</max-active-time>
  159. <max-pool-time>12h</max-pool-time>
  160. </database>
  161. <!--
  162. - Default host configuration applied to all virtual hosts.
  163. -->
  164. <host-default>
  165. <access-log path-format="/data/log/other/access_log.%Y-%m-%d.log"
  166. format='%D %{xxx}c %h %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
  167. rollover-period="1D"/>
  168. <!-- creates the webapps directory for .war expansion -->
  169. <web-app-deploy path="webapps"/>
  170. <!-- creates the deploy directory for .ear expansion -->
  171. <ear-deploy path="deploy">
  172. <ear-default>
  173. <ejb-server>
  174. <config-directory>WEB-INF</config-directory>
  175. </ejb-server>
  176. </ear-default>
  177. </ear-deploy>
  178. <!-- creates the deploy directory for .rar expansion -->
  179. <resource-deploy path="deploy"/>
  180. </host-default>
  181. <!-- configures a deployment directory for virtual hosts -->
  182. <host-deploy path="hosts">
  183. <host-default>
  184. <resin:import path="host.xml" optional="true"/>
  185. </host-default>
  186. </host-deploy>
  187. <!-- configures the default host, matching any host name -->
  188. <host id="" root-directory=".">
  189. <web-app id="/" character-encoding='UTF-8' document-directory="/data/project/ROOT" archive-path="/data/project/ROOT.war">
  190. <stdout-log path="/data/log/devlog/stdout.log" rollover-period="1W"/>
  191. <stderr-log path="/data/log/devlog/stderr.log" rollover-period='1W'/>
  192. <access-log path="/data/log/novelweb/access.log"
  193. 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'
  194. rollover-period="1D"/>
  195. <jsp>
  196. <dependency-check-interval>300s</dependency-check-interval>
  197. </jsp>
  198. </web-app>
  199. </host>
  200. </cluster>
  201. </resin>