2 - Resin 3.1 configuration file.
4 <resin xmlns="http://caucho.com/ns/resin"
5 xmlns:resin="http://caucho.com/ns/resin/core">
7 <!-- adds all .jar files under the resin/lib directory -->
9 <tree-loader path="${resin.home}/ext-lib"/>
10 <tree-loader path="${resin.root}/ext-lib"/>
12 <tree-loader path="${resin.home}/lib"/>
13 <tree-loader path="${resin.root}/lib"/>
17 - Management configuration
19 - Remote management requires at least one enabled admin user.
21 <management path="${resin.root}/admin">
22 <user name="admin" password="password" disable="true"/>
24 <resin:if test="${resin.professional}">
33 - Logging configuration for the JDK logging API.
35 <log name="" level="info" path="stdout:"
36 timestamp="[%H:%M:%S.%s] {%{thread}} "/>
39 - 'info' for production
40 - 'fine' or 'finer' for development and troubleshooting
42 <logger name="com.caucho" level="info"/>
44 <logger name="com.caucho.java" level="config"/>
45 <logger name="com.caucho.loader" level="config"/>
48 - For production sites, change dependency-check-interval to something
49 - like 600s, so it only checks for updates every 10 minutes.
51 <dependency-check-interval>2s</dependency-check-interval>
54 - SMTP server for sending mail notifications
56 <system-property mail.smtp.host="127.0.0.1"/>
57 <system-property mail.smtp.port="25"/>
60 - Sets the default character encoding to utf-8
62 - <character-encoding>utf-8</character-encoding>
66 - You can change the compiler to "javac", "eclipse" or "internal".
68 <javac compiler="internal" args="-source 1.6"/>
70 <!-- Security providers.
72 - com.sun.net.ssl.internal.ssl.Provider
73 - </security-provider>
76 <!-- Uncomment to use Resin's XML implementations
78 - <system-property javax.xml.parsers.DocumentBuilderFactory
79 - ="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>
80 - <system-property javax.xml.parsers.SAXParserFactory
81 - ="com.caucho.xml.parsers.XmlSAXParserFactory"/>
84 <cluster id="app-tier">
85 <!-- sets the content root for the cluster, relative to server.root -->
86 <root-directory>.</root-directory>
89 <!-- The http port -->
90 <http address="*" port="8080"/>
93 - SSL port configuration:
95 - <http address="*" port="8443">
97 - <certificate-file>keys/gryffindor.crt</certificate-file>
98 - <certificate-key-file>keys/gryffindor.key</certificate-key-file>
99 - <password>test123</password>
107 <jvm-arg>-Xss1m</jvm-arg>
108 <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
110 <jvm-arg>-server</jvm-arg>
111 <jvm-arg>-Xverify:none</jvm-arg>
112 <jvm-arg>-Xrs</jvm-arg>
113 <jvm-arg>-Xms256m</jvm-arg>
114 <jvm-arg>-Xmx1024m</jvm-arg>
115 <jvm-arg>-XX:+UseConcMarkSweepGC</jvm-arg>
116 <jvm-arg>-XX:+UseParNewGC</jvm-arg>
117 <jvm-arg>-XX:+CMSParallelRemarkEnabled</jvm-arg>
118 <jvm-arg>-XX:+CMSClassUnloadingEnabled</jvm-arg>
119 <jvm-arg>-XX:MaxPermSize=256m</jvm-arg>
120 <jvm-arg>-XX:MinHeapFreeRatio=20</jvm-arg>
121 <jvm-arg>-Dsun.rmi.dgc.server.gcInterval=900000</jvm-arg>
122 <jvm-arg>-XX:SoftRefLRUPolicyMSPerMB=5000</jvm-arg>
123 <jvm-arg>-Djava.net.preferIPv4Stack=true</jvm-arg>
124 <jvm-arg>-Djava.awt.headless=true</jvm-arg>
125 <jvm-arg>-XX:CompileThreshold=100</jvm-arg>
128 - Uncomment to enable admin heap dumps
129 - <jvm-arg>-agentlib:resin</jvm-arg>
133 - arguments for the watchdog process
135 <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
136 <watchdog-port>6600</watchdog-port>
139 - Configures the minimum free memory allowed before Resin
140 - will force a restart.
142 <memory-free-min>1M</memory-free-min>
144 <!-- Maximum number of threads. -->
145 <thread-max>1024</thread-max>
147 <!-- Configures the socket timeout -->
148 <socket-timeout>65s</socket-timeout>
150 <!-- Configures the keepalive -->
151 <keepalive-max>128</keepalive-max>
152 <keepalive-timeout>15s</keepalive-timeout>
155 - If starting bin/resin as root on Unix, specify the user name
156 - and group name for the web server user.
158 - <user-name>resin</user-name>
159 - <group-name>resin</group-name>
163 <!-- define the servers in the cluster -->
164 <server id="" address="127.0.0.1" port="6800"/>
167 - Configures the persistent store for single-server or clustered
168 - in Resin professional.
170 <resin:if test="${resin.professional}">
171 <persistent-store type="cluster">
172 <init path="session"/>
177 - For security, use a different cookie for SSL sessions.
178 - <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>
182 - Enables the cache (available in Resin Professional)
184 <resin:if test="${resin.professional}">
185 <cache path="cache" memory-size="64M">
186 <!-- Vary header rewriting for IE -->
187 <rewrite-vary-as-private/>
192 - Enables periodic checking of the server status and
193 - check for deadlocks..
195 - All servers can add <url>s to be checked.
197 <resin:if test="${resin.professional}">
199 <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
204 - Defaults applied to each web-app.
209 - Extension library for common jar files. The ext is safe
210 - even for non-classloader aware jars. The loaded classes
211 - will be loaded separately for each web-app, i.e. the class
212 - itself will be distinct.
215 <tree-loader path="${resin.root}/ext-webapp-lib"/>
219 - Enable EL expressions in Servlet and Filter init-param
225 - Sets timeout values for cacheable pages, e.g. static pages.
227 <cache-mapping url-pattern="/" expires="5s"/>
228 <cache-mapping url-pattern="*.gif" expires="60s"/>
229 <cache-mapping url-pattern="*.jpg" expires="60s"/>
230 <cache-mapping url-pattern="*.png" expires="60s"/>
233 - for security, disable session URLs by default.
236 <enable-url-rewriting>false</enable-url-rewriting>
240 - For security, set the HttpOnly flag in cookies.
241 - <cookie-http-only/>
245 - Some JSP packages have incorrect .tld files. It's possible to
246 - set validate-taglib-schema to false to work around these packages.
249 <validate-taglib-schema>true</validate-taglib-schema>
250 <fast-jstl>true</fast-jstl>
254 <!-- includes the app-default for default web-app behavior -->
255 <resin:import path="${resin.home}/conf/app-default.xml"/>
258 - Sample database pool configuration
260 - The JDBC name is java:comp/env/jdbc/test
262 <jndi-name>jdbc/mysql</jndi-name>
263 <driver type="org.gjt.mm.mysql.Driver">
264 <url>jdbc:mysql://localhost:3306/test</url>
266 <password></password>
268 <prepared-statement-cache-size>8</prepared-statement-cache-size>
269 <max-connections>20</max-connections>
270 <max-idle-time>30s</max-idle-time>
275 - Default host configuration applied to all virtual hosts.
279 - With another web server, like Apache, this can be commented out
280 - because the web server will log this information.
281 <access-log path="logs/access.log"
282 format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
283 rollover-period="1W"/>
286 <!-- creates the webapps directory for .war expansion -->
287 <web-app-deploy path="webapps"/>
289 <!-- creates the deploy directory for .ear expansion -->
290 <ear-deploy path="deploy">
293 <config-directory>WEB-INF</config-directory>
298 <!-- creates the deploy directory for .rar expansion -->
299 <resource-deploy path="deploy"/>
302 <!-- configures a deployment directory for virtual hosts -->
303 <host-deploy path="hosts">
305 <resin:import path="host.xml" optional="true"/>
309 <!-- configures the default host, matching any host name -->
310 <host id="" root-directory=".">
312 - configures an explicit root web-app matching the
315 <web-app id="/" root-directory="webapps/ROOT"/>
317 <web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
319 - Administration application /resin-admin
322 <resin:set var="resin_admin_external" value="false"/>
323 <resin:set var="resin_admin_insecure" value="true"/>
330 - Configuration for the web-tier/load-balancer
332 <resin:if test="${resin.professional}">
333 <cluster id="web-tier">
335 <!-- The http port -->
336 <http address="*" port="9080"/>
339 <server id="web-a" address="127.0.0.1" port="6700"/>
341 <cache path="cache" memory-size="64M"/>
347 <load-balance regexp="" cluster="app-tier"/>