The Resin configuration (resin.xml
) pasted below achieves the following:
- Binds the built-in http server to port 8000
- Sets the desired maximum memory allocation (
-Xmx512m
) - Configures the webapp /path/web/root accessible from
http://domain.com
andhttp://(www|www1|www2).domain.com
- Sets up access logging to /path/to/logs/access.log
This is the Resin configuration:
<resin>
<cluster id="app-tier">
<server-default>
<!-- #1 -->
<http port="8000"/>
<!-- #2 -->
<jvm-arg>-Xmx512m</jvm-arg>
</server-default>
<!-- #3 -->
<host id='domain.com' root-directory="/path/web/root">
<web-app id="/" />
<!-- #3 -->
<host-alias-regexp>(www|www1|www2).domain.com</host-alias-regexp>
<!-- #4 -->
<access-log path="/path/to/logs/access.log" />
</host>
</cluster>
</resin>
I'm switching from Resin to Tomcat and my question is hence:
- What is the "best practice configuration" for Tomcat to achieve the four things outlined above?