resin.conf 8.5 KB

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