resin.conf 10 KB

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