resin.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <!--
  2. - Resin 4.0 configuration file.
  3. -->
  4. <resin xmlns="http://caucho.com/ns/resin"
  5. xmlns:resin="urn:java:com.caucho.resin">
  6. <!-- property-based Resin configuration -->
  7. <resin:properties path="${__DIR__}/resin.properties" optional="true"/>
  8. <resin:if test="${properties_import_url}">
  9. <resin:properties path="${properties_import_url}"
  10. optional="true" recover="true"/>
  11. </resin:if>
  12. <!-- Logging configuration for the JDK logging API -->
  13. <log-handler name="" level="all" path="stdout:"
  14. timestamp="[%y-%m-%d %H:%M:%S.%s]"
  15. format=" {${thread}} ${log.message}"/>
  16. <!--
  17. - Alternative pseudo-TTCC log format
  18. -
  19. - <log-handler name="" level="all" path="stdout:"
  20. - timestamp="%y-%m-%d %H:%M:%S.%s"
  21. - format=" [${thread}] ${log.level} ${log.shortName} - ${log.message}"/>
  22. -->
  23. <!--
  24. - level='info' for production
  25. - 'fine' or 'finer' for development and troubleshooting
  26. -->
  27. <logger name="" level="${log_level?:'info'}"/>
  28. <logger name="com.caucho.java" level="config"/>
  29. <logger name="com.caucho.loader" level="config"/>
  30. <!--
  31. - Default configuration applied to all clusters, including
  32. - HTTP, HTTPS, and /resin-admin configuration.
  33. -->
  34. <resin:import path="${__DIR__}/cluster-default.xml"/>
  35. <!--
  36. - health configuration
  37. -->
  38. <resin:import path="${__DIR__}/health.xml"/>
  39. <!--
  40. - Remote management requires at least one enabled admin user.
  41. -->
  42. <resin:AdminAuthenticator>
  43. <user name="${admin_user}" password="${admin_password}"/>
  44. <resin:import path="${__DIR__}/admin-users.xml" optional="true"/>
  45. </resin:AdminAuthenticator>
  46. <!--
  47. - For clustered systems, create a password in as cluster_system_key
  48. -->
  49. <cluster-system-key>${cluster_system_key}</cluster-system-key>
  50. <!--
  51. - For production sites, change dependency-check-interval to something
  52. - like 600s, so it only checks for updates every 10 minutes.
  53. -->
  54. <dependency-check-interval>${dependency_check_interval?:'2s'}</dependency-check-interval>
  55. <!-- For resin.properties dynamic cluster joining -->
  56. <home-cluster>${home_cluster}</home-cluster>
  57. <home-server>${home_server}</home-server>
  58. <elastic-server>${elastic_server}</elastic-server>
  59. <elastic-dns>${elastic_dns}</elastic-dns>
  60. <!--
  61. - JSSE default properties
  62. -->
  63. <system-property
  64. jdk.tls.ephemeralDHKeySize="2048"
  65. jdk.tls.rejectClientInitiatedRenegotiation="true"
  66. sun.security.ssl.allowUnsafeRenegotiation="false"
  67. sun.security.ssl.allowLegacyHelloMessages="false"/>
  68. <!--
  69. - Configures the main application cluster. Load-balancing configurations
  70. - will also have a web cluster.
  71. -->
  72. <cluster id="app">
  73. <!-- define the servers in the cluster -->
  74. <server-multi id-prefix="app-" address-list="${app_servers}" port="6800"/>
  75. <host-default>
  76. <!-- creates the webapps directory for .war expansion -->
  77. <web-app-deploy path="/data/project"
  78. expand-preserve-fileset="WEB-INF/work/**"
  79. multiversion-routing="${webapp_multiversion_routing}"
  80. path-suffix="${elastic_webapp?resin.id:''}"/>
  81. </host-default>
  82. <!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
  83. <host-deploy path="hosts">
  84. <host-default>
  85. <resin:import path="host.xml" optional="true"/>
  86. </host-default>
  87. </host-deploy>
  88. <!-- the default host, matching any host name -->
  89. <host id="" root-directory=".">
  90. <!--
  91. - webapps can be overridden/extended in the resin.xml
  92. -->
  93. <web-app id="/" root-directory="/data/project/ROOT"/>
  94. <stderr-log path='/data/wapage/log/resin/stderr.log' timestamp='[%Y-%m-%d %H:%M:%S] ' rollover-period='1D'/>
  95. <stdout-log path='/data/wapage/log/resin/stdout.log' timestamp='[%Y-%m-%d %H:%M:%S] ' rollover-period='1D'/>
  96. </host>
  97. <resin:if test="${resin_doc}">
  98. <host id="${resin_doc_host}" root-directory="${resin_doc_host}">
  99. <web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
  100. </host>
  101. </resin:if>
  102. </cluster>
  103. <cluster id="web">
  104. <!-- define the servers in the cluster -->
  105. <server-multi id-prefix="web-" address-list="${web_servers}" port="6810"/>
  106. <host id="" root-directory="web">
  107. <web-app id="">
  108. <resin:LoadBalance regexp="" cluster="app"/>
  109. </web-app>
  110. <web-app id="/async">
  111. <resin:LoadBalance regexp="" cluster="app"/>
  112. </web-app>
  113. </host>
  114. </cluster>
  115. <cluster id="memcached" xmlns:memcache="urn:java:com.caucho.memcached">
  116. <!-- define the servers in the cluster -->
  117. <server-multi id-prefix="memcached-" address-list="${memcached_servers}" port="6820">
  118. <!-- listen for the memcache protocol -->
  119. <listen port="${memcached_port?:11211}"
  120. keepalive-timeout="600s" socket-timeout="600s">
  121. <memcache:MemcachedProtocol/>
  122. </listen>
  123. </server-multi>
  124. </cluster>
  125. <cluster id="proxycache">
  126. <!-- define the servers in the cluster -->
  127. <server-multi id-prefix="proxycache-" address-list="${proxycache_servers}" port="6830"/>
  128. <host id="" root-directory="proxycache">
  129. <web-app id="">
  130. <resin:HttpProxy regexp=".*">
  131. <!-- backend HTTP servers to proxy to -->
  132. <addresses>${backend_servers}</addresses>
  133. </resin:HttpProxy>
  134. </web-app>
  135. </host>
  136. </cluster>
  137. </resin>