Lessie Z. Mitch wrote:
/tomcat_home/conf/server.xml
<!-- ip 123.234.345.1 -->
<Host name="domain1.com" appBase="/home/web/domain1.com/webapps" ~~~ no directory after
webapps
unpackWARs="true" autoDeploy="true">
 </Host>

This now looks good. Note that *any* directory or war under
/home/web/domain1.com/webapps is going to get deployed as a webapp.

So now I move the contexts out of the server.xml into this recommended
configuration. Keep in mind, I am STILL working with war files that extract
to directories.


/tomcat_home/conf/server.xml
<!-- ip 123.234.345.1 -->
<Host name="domain1.com" appBase="/home/web/domain1.com/webapps/domain1" unpackWARs="true" autoDeploy="true">
 </Host>

Note setting appBase==docBase is going to create a world of pain. Your
change above should have fixed this.

Context files for domain1 (will only do domain1 as the other two are
mimicked)
/tomcat_home/conf/Catalina/domain1.com/ROOT.xml  ~~ this is so that when
type http://domain1.com/ site will appear
<Context
          docBase="/home/web/domain1.com/domain1"
          reloadable="true">
</Context>

Also looks OK.

Physical directory
Home
\__web
   \__domain1.com
      \__domain1   ~~~ from war located in webapps, moved it out as war
extracts into webapps

I assume this is now
Home
\__web
   \__domain1.com
      \__domain1   ~~~ ROOT webapp for domain1.com
      \__webapps   ~~~ Other war files

Note that domain1 could be a dir or a war

This is now working on my server. Although not exactly what I wanted... 1-had to move extracted war directories OUT of webapps
2-ROOT context in /tomcat_home/conf/Catalina/domain1 directory (using that
"ROOT" name)

This should be fixed now.

Why does my original configuration not work anymore? I will keep Mark's
recommended configuration but would like to know they "why" behind the
"how". Helps me understand when launching other sites on this server (there
will be another 4 virtual hosts, each serving up 3 or 4 webapps).

The 2.5 servlet spec relaxed the rules on what could be deployed as a
webapp to include a dir with just static files and/or JSPs. To support
this, Tomcat deploys any dir under a host's appBase as a webapp. This was
ported back to 5.5 since it doesn't break the spec and was viewed as useful.

Setting appBase==docBase was invalid and never supported but, as the
side-effect of a bug, actually worked. A number of how-to guides suggested
this config and people started to use it. When the bug was fixed the
invalid configuration stopped working. This fix combined with the
auto-deployment of any dir in an appBase created all sorts of weirdness.

Hope this explains some of the background.

Mark


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to