What exactly is Tomcat's initial setup?

doubtintom's picture

 I have read the outline provided in the feature page for the Tomcat appliance ( ). In general, Tomcat/Apache integration offers a rich set of options. I'm trying to sort out more details about what is pre-configured in this appliance, and how to customize the configuration further.

  1. One item of interest is configuring Apache to serve static content and Tomcat to only serve web services content via servlets. It appears to me that this is not configured in the Turnkey Tomcat appliance. Am I right?
  2. Beyond that I want to be able to configure multiple Tomcats per Apache.
  3. Third, I want to know how to test whether these configurations are working. The tests I've found around the web usually require using a browser to load localhost. Is it equivalent to use the LAN IP address from a different computer? The Turnkey appliance is a server (thankfully) and has no browser.
  4. Another worthwhile piece of information - Turnkey team, which Apache pages or other web resources, or which book did you use in doing your mod_jk/Tomcat/Apache configuration?

Since this is my first post, I want to thank the Turnkey team for the incredible service and resources they have given to the community. You have accelerated the uptake and delivery of many of the best open source projects available. Hats off to you!


Alon Swartz's picture

Apache serving static content
Apache is configured to serve static content out of the webroot /var/www, and uses /etc/tomcat5.5/mod_jk.conf to configure the JkMounts. What should happen in this configuration, is any request that does not match the JkMounts is served by Apache.

You will however want to edit mod_jk.conf to remove the /welcome Jkmount along with the /welcome RedirectMatch directive.

Multiple Tomcats per Apache
Sure. Although I have never done this myself, it should be easy enough, check out this link for some pointers.

If however you are planning on using TurnKey Tomcat appliances for the "other" tomcats, you will have to do some configurations manually (eg. configure Tomcat connectors to listen on the required interfaces, instead of localhost).
If there is enough interest in setting up this type of configuration, we could possibly create a Tomcat node type appliance... needs more thought.

Testing that everything works
I suppose it depends on the testing tools you are referring to, but most probably you will be able to provide the target IP to test, in which case the IP of the Tomcat server would be appropriate, I assume.

Mainly, and google.
Can you recommend any good resources?

I hope the above answers your questions, if not, let us know. Btw - any feedback on how to improve the Tomcat appliance would be great.

Post new comment