Apache-style single webapp server

From Resin 3.0

Jump to: navigation, search
40px-Edit-clear.png This article requires cleanup and may refer to a legacy version of Resin.

Please visit http://www.caucho.com/documentation/ for the most up-to-date documentation.

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"

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

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

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


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

     <proxy-cache memory-size="64M"/>

     <host id="">

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

       <web-app id="/">

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

  • <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


Deployment in this configuration is possible in a number of ways

  1. use /var/www/public-html directly, for example expanding a wordpress application
  2. deploy /var/www/ROOT.war and let Resin deploy and expand from that file
  3. use the Resin command line to deploy ROOT.war
  4. use the /resin-admin deploy form (currently in web-apps) to deploy the ROOT.war

command line deployment

The command line deployment would look like:

unix> java -jar lib/resin.jar deploy -user admin -password xxxx ROOT.war

The user and password are configured in the admin-users.xml. The /resin-admin:9080 page has a form to help create the admin-users.xml file.

Personal tools