resin.conf 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  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. <!--
  28. - Logging configuration for the JDK logging API.
  29. -->
  30. <log name="" level="info" path="stdout:"
  31. timestamp="[%H:%M:%S.%s] {%{thread}} "/>
  32. <!--
  33. - 'info' for production
  34. - 'fine' or 'finer' for development and troubleshooting
  35. -->
  36. <logger name="com.caucho" level="info"/>
  37. <logger name="com.caucho.java" level="config"/>
  38. <logger name="com.caucho.loader" level="config"/>
  39. <!--
  40. - For production sites, change dependency-check-interval to something
  41. - like 600s, so it only checks for updates every 10 minutes.
  42. -->
  43. <dependency-check-interval>2s</dependency-check-interval>
  44. <!--
  45. - SMTP server for sending mail notifications
  46. -->
  47. <system-property mail.smtp.host="127.0.0.1"/>
  48. <system-property mail.smtp.port="25"/>
  49. <!--
  50. - Sets the default character encoding to utf-8
  51. -
  52. - <character-encoding>utf-8</character-encoding>
  53. -->
  54. <!--
  55. - You can change the compiler to "javac", "eclipse" or "internal".
  56. -->
  57. <javac compiler="internal" args="-source 1.5"/>
  58. <!-- Security providers.
  59. - <security-provider>
  60. - com.sun.net.ssl.internal.ssl.Provider
  61. - </security-provider>
  62. -->
  63. <!-- Uncomment to use Resin's XML implementations
  64. -
  65. - <system-property javax.xml.parsers.DocumentBuilderFactory
  66. - ="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>
  67. - <system-property javax.xml.parsers.SAXParserFactory
  68. - ="com.caucho.xml.parsers.XmlSAXParserFactory"/>
  69. -->
  70. <cluster id="app-tier">
  71. <!-- sets the content root for the cluster, relative to server.root -->
  72. <root-directory>.</root-directory>
  73. <server-default>
  74. <!-- The http port -->
  75. <http address="*" port="8080"/>
  76. <!--
  77. - SSL port configuration:
  78. -
  79. - <http address="*" port="8443">
  80. - <openssl>
  81. - <certificate-file>keys/gryffindor.crt</certificate-file>
  82. - <certificate-key-file>keys/gryffindor.key</certificate-key-file>
  83. - <password>test123</password>
  84. - </openssl>
  85. - </http>
  86. -->
  87. <!--
  88. - The JVM arguments
  89. -->
  90. <jvm-arg>-server</jvm-arg>
  91. <jvm-arg>-Xmx1536m</jvm-arg>
  92. <jvm-arg>-Xms1536m</jvm-arg>
  93. <jvm-arg>-Xmn400m</jvm-arg>
  94. <jvm-arg>-Xss1m</jvm-arg>
  95. <jvm-arg>-XX:PermSize=128m</jvm-arg>
  96. <jvm-arg>-XX:MaxPermSize=256m</jvm-arg>
  97. <jvm-arg>-Xdebug</jvm-arg>
  98. <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
  99. <!--
  100. - Uncomment to enable admin heap dumps
  101. - <jvm-arg>-agentlib:resin</jvm-arg>
  102. -->
  103. <!--
  104. - arguments for the watchdog process
  105. -->
  106. <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
  107. <watchdog-port>6600</watchdog-port>
  108. <!--
  109. - Configures the minimum free memory allowed before Resin
  110. - will force a restart.
  111. -->
  112. <memory-free-min>1M</memory-free-min>
  113. <!-- Maximum number of threads. -->
  114. <thread-max>2000</thread-max>
  115. <!-- Configures the socket timeout -->
  116. <socket-timeout>15s</socket-timeout>
  117. <!-- Configures the keepalive -->
  118. <keepalive-max>128</keepalive-max>
  119. <keepalive-timeout>15s</keepalive-timeout>
  120. <!--
  121. - If starting bin/resin as root on Unix, specify the user name
  122. - and group name for the web server user.
  123. -
  124. - <user-name>resin</user-name>
  125. - <group-name>resin</group-name>
  126. -->
  127. </server-default>
  128. <!-- define the servers in the cluster -->
  129. <server id="" address="127.0.0.1" port="6800"/>
  130. <!--
  131. - Configures the persistent store for single-server or clustered
  132. - in Resin professional.
  133. -->
  134. <resin:if test="${resin.professional}">
  135. <persistent-store type="cluster">
  136. <init path="session"/>
  137. </persistent-store>
  138. </resin:if>
  139. <!--
  140. - For security, use a different cookie for SSL sessions.
  141. - <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>
  142. -->
  143. <!--
  144. - Enables the cache (available in Resin Professional)
  145. -->
  146. <resin:if test="${resin.professional}">
  147. <cache path="cache" memory-size="64M">
  148. <!-- Vary header rewriting for IE -->
  149. <rewrite-vary-as-private/>
  150. </cache>
  151. </resin:if>
  152. <!--
  153. - Enables periodic checking of the server status and
  154. - check for deadlocks..
  155. -
  156. - All servers can add <url>s to be checked.
  157. -->
  158. <resin:if test="${resin.professional}">
  159. <ping>
  160. <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
  161. </ping>
  162. </resin:if>
  163. <!--
  164. - Defaults applied to each web-app.
  165. -->
  166. <web-app-default>
  167. <prologue>
  168. <!--
  169. - Extension library for common jar files. The ext is safe
  170. - even for non-classloader aware jars. The loaded classes
  171. - will be loaded separately for each web-app, i.e. the class
  172. - itself will be distinct.
  173. -->
  174. <class-loader>
  175. <tree-loader path="${resin.root}/ext-webapp-lib"/>
  176. </class-loader>
  177. <!--
  178. - Enable EL expressions in Servlet and Filter init-param
  179. -->
  180. <allow-servlet-el/>
  181. </prologue>
  182. <!--
  183. - Sets timeout values for cacheable pages, e.g. static pages.
  184. -->
  185. <cache-mapping url-pattern="/" expires="5s"/>
  186. <cache-mapping url-pattern="*.gif" expires="60s"/>
  187. <cache-mapping url-pattern="*.jpg" expires="60s"/>
  188. <cache-mapping url-pattern="*.png" expires="60s"/>
  189. <!--
  190. - for security, disable session URLs by default.
  191. -->
  192. <session-config>
  193. <enable-url-rewriting>false</enable-url-rewriting>
  194. </session-config>
  195. <!--
  196. - For security, set the HttpOnly flag in cookies.
  197. - <cookie-http-only/>
  198. -->
  199. <!--
  200. - Some JSP packages have incorrect .tld files. It's possible to
  201. - set validate-taglib-schema to false to work around these packages.
  202. -->
  203. <jsp>
  204. <validate-taglib-schema>true</validate-taglib-schema>
  205. <fast-jstl>true</fast-jstl>
  206. <fast-jsf>false</fast-jsf>
  207. </jsp>
  208. </web-app-default>
  209. <!-- includes the app-default for default web-app behavior -->
  210. <resin:import path="${resin.home}/conf/app-default.xml"/>
  211. <!--
  212. - Sample database pool configuration
  213. -
  214. - The JDBC name is java:comp/env/jdbc/test
  215. <database>
  216. <jndi-name>jdbc/mysql</jndi-name>
  217. <driver type="org.gjt.mm.mysql.Driver">
  218. <url>jdbc:mysql://localhost:3306/test</url>
  219. <user></user>
  220. <password></password>
  221. </driver>
  222. <prepared-statement-cache-size>8</prepared-statement-cache-size>
  223. <max-connections>20</max-connections>
  224. <max-idle-time>30s</max-idle-time>
  225. </database>
  226. -->
  227. <!--
  228. - Default host configuration applied to all virtual hosts.
  229. -->
  230. <host-default>
  231. <!--
  232. - With another web server, like Apache, this can be commented out
  233. - because the web server will log this information.
  234. -->
  235. <access-log path="logs/access.log"
  236. format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
  237. rollover-period="1W"/>
  238. <!-- creates the webapps directory for .war expansion -->
  239. <web-app-deploy path="/app/wapage/webfront"/>
  240. <!-- creates the deploy directory for .ear expansion -->
  241. <ear-deploy path="deploy">
  242. <ear-default>
  243. <ejb-server>
  244. <config-directory>WEB-INF</config-directory>
  245. </ejb-server>
  246. </ear-default>
  247. </ear-deploy>
  248. <!-- creates the deploy directory for .rar expansion -->
  249. <resource-deploy path="deploy"/>
  250. </host-default>
  251. <!-- configures a deployment directory for virtual hosts -->
  252. <host-deploy path="hosts">
  253. <host-default>
  254. <resin:import path="host.xml" optional="true"/>
  255. </host-default>
  256. </host-deploy>
  257. <!-- configures the default host, matching any host name -->
  258. <host id="" root-directory=".">
  259. <!--
  260. - configures an explicit root web-app matching the
  261. - webapp's ROOT
  262. -->
  263. <web-app id="/" character-encoding='UTF-8' document-directory="/data/project/ROOT" archive-path="/data/project/ROOT.war">
  264. <stdout-log path="/data/log/devlog/stdout.log" rollover-period="1W"/>
  265. <stderr-log path="/data/log/devlog/stderr.log" rollover-period='1W'/>
  266. <access-log path="/dev/null" />
  267. <jsp>
  268. <dependency-check-interval>300s</dependency-check-interval>
  269. </jsp>
  270. </web-app>
  271. <web-app-deploy path="/app/wapage/webfront"/>
  272. </host>
  273. </cluster>
  274. <!--
  275. - Configuration for the web-tier/load-balancer
  276. -->
  277. <resin:if test="${resin.professional}">
  278. <cluster id="web-tier">
  279. <server-default>
  280. <!-- The http port -->
  281. <http address="*" port="9080"/>
  282. </server-default>
  283. <server id="web-a" address="127.0.0.1" port="6700"/>
  284. <cache path="cache" memory-size="64M"/>
  285. <host id="">
  286. <web-app id="/">
  287. <rewrite-dispatch>
  288. <load-balance regexp="" cluster="app-tier"/>
  289. </rewrite-dispatch>
  290. </web-app>
  291. </host>
  292. </cluster>
  293. </resin:if>
  294. </resin>