Apache-style single webapp server

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
 
Resin can be configured with an Apache-style document root, like /var/www/public-html. The configuration can continue to use .war style deployment or Resin's repository deployment.
 
Resin can be configured with an Apache-style document root, like /var/www/public-html. The configuration can continue to use .war style deployment or Resin's repository deployment.
  
* changes to "resin" user from root
+
* changes to "resin" user from root
* /var/www/public-html is the single root directory
+
* /var/www/public-html is the single root directory
* listens to port 80
+
* listens to port 80
* listens to port 8090 for /resin-admin
+
* listens to port 8090 for /resin-admin
* enables proxy-cache with 64M memory
+
* enables proxy-cache with 64M memory
  
 
== resin.xml configuration ==
 
== resin.xml configuration ==
Line 70: Line 70:
 
     </cluster>
 
     </cluster>
 
   </resin>
 
   </resin>
 +
 +
* <log-handler> configures java.util.logging to log all output in ${resin.root}/log
 +
* <logger> sets the logging level for com.caucho to "info".
 +
* <http port="80"/> listens to port 80 for HTTP
 +
* <http port="8090"/> listens to port 8090 for /resin-admin
 +
* <archive-path>/var/www/ROOT.war</archive-path> sets the optional location for ROOT.war deployment

Revision as of 00:58, 29 September 2010


Resin can be configured with an Apache-style document root, like /var/www/public-html. The configuration can continue to use .war style deployment or Resin's repository deployment.

  • changes to "resin" user from root
  • /var/www/public-html is the single root directory
  • listens to port 80
  • listens to port 8090 for /resin-admin
  • enables proxy-cache with 64M memory

resin.xml configuration

 <resin xmlns="http://caucho.com/ns/resin"
        xmlns:resin="urn:java:com.caucho.resin">

   <log-handler name="" level="all" path="stdout:"
                timestamp="[%y-%m-%d %H:%M:%S.%s] "/>

   <logger name="com.caucho" level="info"/>

   <resin:AdminAuthenticator>
     <resin:import path="${__DIR__}/admin-users.xml" optional="true"/>
   </resin:AdminAuthenticator>
  
   <cluster id="web-cluster">
     <server-default>
       <http port="80"/>
       <http port="8090"/> 

       <user-name>resin</user-name>
       <group-name>resin</group-name>
     </server-default>

     <server id="a" address="192.168.1.10" port="6800"/>
 
     <resin:import path="${__DIR__}/app-default.xml"/>

     <development-mode-error-page/>
 
     <proxy-cache memory-size="64M"/>

     <resin:DeployService/>
     <resin:JmxService/>
     <resin:LogService/>
     <resin:StatService/>
 
     <host id="">
       <root-directory>/var/www</root-directory>

       <access-log path="log/access.log"
                   format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
                   rollover-period="1W"/>

       <web-app id="/">
         <root-directory>/var/www/public-html</root-directory>
         <archive-path>/var/www/ROOT.war</archive-path>
       </web-app>
     </host>

     <host id="*:8090">
   
       <web-app id="/resin-admin" root-directory="${resin.root}/doc/admin">
         <prologue>
           <resin:set var="resin_admin_external" value="false"/>
           <resin:set var="resin_admin_insecure" value="true"/>
         </prologue>
       </web-app>

     </host>
   </cluster>
 </resin>
  • <log-handler> configures java.util.logging to log all output in ${resin.root}/log
  • <logger> sets the logging level for com.caucho to "info".
  • <http port="80"/> listens to port 80 for HTTP
  • <http port="8090"/> listens to port 8090 for /resin-admin
  • <archive-path>/var/www/ROOT.war</archive-path> sets the optional location for ROOT.war deployment
Personal tools