Mantis - Resin
Viewing Issue Advanced Details
3873 minor always 02-03-10 11:43 02-18-10 11:47
closed 4.0.3  
none 4.0.4  
0003873: resin 4.0.3 reports strange error web-app's root-directory 'null' must be outside of the 'Host[default]' root-directory
web-app's root-directory 'null' must be outside of the 'Host[default]' root-directory when using 'archive-path

--- resin.xml snippet ---
    <cluster id="dealfinder">
        <!-- sets the content root for the cluster, relative to resin.root -->

        <!-- defaults for each server, i.e. JVM -->
            <!-- The http port -->
            <http address="*" port="7841" />

        <!-- define the servers in the cluster -->
        <server id="dealfinder" address="${MYIP}" port="6841" watchdog-port="6700">
            <!-- server-specific configuration, e.g. jvm-arg goes here -->

        <!-- the default host, matching any host name -->
        <host id="" root-directory=".">
            <access-log path="instances/dealfinder/access.log"
                        format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period="1W" />
             - configures an explicit root web-app matching the
             - webapp's ROOT
            <web-app id="/" root-directory="webapps/dealfinder/ROOT" archive-path="webapps/dealfinder/ROOT.war">

             - Administration application /resin-admin
            <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" />

        - Resin documentation - remove for a live site
            <web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc" />

        - <resin:LoadBalance regexp="^/load" cluster="backend-tier"/>
        - <resin:HttpProxy regexp="^/http" address="localhost:9000"/>
        - <resin:FastCgiProxy regexp="^/fcgi" address="localhost:9001"/>
==== end resin.xml snippet ===

02-03-10 12:01   
Thanks for the bug report.

Is is possible to get a stack trace of that exception (level='finer' should give that information.)

The issue is a security-related one. Because the host root directory generally has sensitive data (like log files), any web-app must be a sub directory under the root (otherwise anyone might be able to browse the host.)

From the configuration, I can't see the <web-app> with a directory in the host's own root-directory, but it may be in a <host-default> or <cluster-default>.
02-03-10 12:10   
Hmm. I guess its not a fatal error because this is all the info I get when changing to finer level logging

[10-02-03 15:08:34.200] {main} Host[default] initializing
[10-02-03 15:08:34.200] {main} Host[default] root-directory=/usr/local/resin/
[10-02-03 15:08:34.219] {main} web-app's root-directory 'null' must be outside of the 'Host[default]' root-directory when using 'archive-path
[10-02-03 15:08:34.222] {main} Host[default] starting
02-03-10 14:28   
I just noticed that the war is being expanded into /usr/local/resin/ROOT
02-18-10 11:47