After installing Tomcat 5 what configuration changes/tweaks do you apply, and why?
Be specific: name what files you edit, what settings you change and why you do it.
Some areas of interest:
- General configuration changes
- Best practices with regards to "virtual host handling"
- Performance tweaks
- Stability tweaks
- Security settings
Usually, I'm just tweaking startup parameters to adjust Heap sizes for better performance.
Here is the simple script I use :
I have the default directoy "Catalina Home' and 'Catalina Base' I put the webapps into 'Catalina base' every time I launch my scripts, war are deployed. I also have some JAVA_OPTS : like run Java in deamon mode, I specify the memory I want to allocate I add the Timezone Also
In context configuration for webapps, which may be in ./conf/Catalina/localhost/.xml, ./webapps/.xml, or within ./conf/server.xml, I set reloadable="false". This prevents Tomcat from constantly polling for changes to the webapp's class files and jars, which is an unnecessary load. See the Context configuration documentation.
In ./conf/server.xml I go through and comment out bits I'm not using, such as unused connectors.
In ./conf/server.xml, look at the values for maxThreads, connectionTimeout, and similar attributes of the Connectors. There is no standard recommended value for these, you need to work out the optimal values based on your application, usage patterns, etc. See the documentation for the HTTP Connector and the AJP Connector for details.
I also strip out the default webapps, except for the ones I need.
Since I do use the tomcat-manager webapp, I lock it down. I configure the user account to access it, and configure Apache httpd access controls on the URL to lock access to relevant IP addresses.
Order deny,allow Deny from all Allow from 127.0.0.1 Allow from 192.168.0
Also in Apache, I block access to the WEB-INF directory (I don't have an example to hand).
Heap size for tweaking is better
Another good source of information would be this webinar
http://www.springsource.com/webinar/apache-tomcat-tips-and-tricks-pros
Unfortunately you have to register....