Resin Documentationapp server |
resin.xml: configuration overview
Overview of the Resin configuration: resin.properties for most common properties and resin.xml for full customization. All Resin configuration is ultimately managed by the resin.xml. To keep configuration manageable, the resin.xml imports properties files like resin.properties, and xml files like cluster-default.xml and health.xml. Many sites will never need to change the resin.xml and can just modify the resin.properties.
The resin.properties defines properties used by the resin.xml for the Resin server and cluster. Many sites will only need to modify the resin.properties for their configuration. # web-tier Triad servers: web-0 web-1 web-2 # web_servers : 192.168.1.20:6810 # web.http : 80 # app-tier Triad servers: app-0 app-1 app-2 app_servers : 192.168.1.10:6800 192.168.1.11:6800 app.http : 8080 setuid_user : resin setuid_group : resin home_cluster : app elastic_cloud_enable : true jvm_args : -Xmx2048m -XX:MaxPermSize=256m web_admin_enable : true admin_user : my-admin admin_password : {SSHA}G3UOLv0dkJHTZxAwmhrIC2CRBZ4VJgTB The properties in resin.properties are converted into JSP EL variable used by the resin.xml, like port="${http}". Properties can be qualified by the server's name or by its cluster. The app.http in the above example is the ${http} variable specific to the "app" cluster. You can also use app-0.http to define a custom http port for a specific server. The resin.xml file is the root of Resin's configuration. Other files like the resin.properties and cluster-default.xml are imported files to organize the configuration. Conceptually, they're all delegated from the resin.xml. The resin.xml configures clusters, servers, virtual hosts, web-app deployment, resources, health checks, and class-loaders. Almost all of Resin's behavior is configured by the resin.xml. The standard resin.xml distributed with Resin and its property file reisn.properties configures a standard, flexible clustering system including an application server tier, a http web tier, and virtual hosts. Many sites will not need to modify the standard resin.xml. The resin.xml is flexible enough to configure non-http servers. If you have a non-http Java service, it can take advantage of Resin's watchdog, lifecycle and health system by being configured as a standard CDI service in a non-http Resin system. <resin xmlns="http://caucho.com/ns/resin" xmlns:resin="urn:java:com.caucho.resin"> <cluster-default> <!-- shared configuration across all clusters --> <resin:import path="classpath:META-INF/caucho/app-default.xml"/> <resin:import path="${__DIR__}/health.xml" optional="true"/> </cluster-default> <cluster id="my-cluster"> <server-default> <!-- thread limits, JVM config, keepalives, ports, HTTP --> <http port="8080"/> </server-default> <server id="server-a" address="192.168.1.10" port="6800"/> <server id="server-b" address="192.168.1.11" port="6800"/> <host id="www.myhost.com" root-directory="hosts/myhost.com"> <resin:MovedPermanently regexp="/old-file" target="/new-path"/> <web-app-deploy path="webapps" expand-preserve-fileset="WEB-INF/work/**"/> <web-app id="/custom"> </web-app> </host> </cluster> </resin>
|