Apache-style single webapp server

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
(New page: Category: Cookbook 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 reposi...)
 
Line 2: Line 2:
  
 
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
 +
* /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"/> <!-- /resin-admin -->
 +
 +
        <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>

Revision as of 00:56, 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>
Personal tools