Last modified: 31 Aug 2007
WARNING: This documentation covers Parallels H-Sphere versions up to 3.1. For the latest up-to-date Parallels H-Sphere documentation, please proceed to the
official Parallels site.
Tomcat installation is located in the /hsphere/local/home/cpanel/jakarta directory.
The core H-Sphere directories such as shiva, shiva-templates,
psoft, and psoft-config are now located in the
/hsphere/local/home/cpanel/hsphere/WEB-INF/classes/ directory with H-Sphere classes
run by Tomcat. Symlinks to these new locations are put in place of the old directories
to preserve H-Sphere integrity with previous versions' configuration.
Tomcat Configuration Files
Tomcat configuration files are located in the
/hsphere/local/home/cpanel/jakarta/conf/server.xml - XML config file for Tomcat;
/hsphere/local/home/cpanel/hsphere/WEB-INF/web.xml - XML configuration file
where CP servlet configuration is set;
/hsphere/local/home/cpanel/apache/etc/mod_jk.conf - mod_jk configuration. mod_jk is
a Tomcat-Apache plug-in that handles the communication between Tomcat and Apache. For more details,
documentation on mod_jk.
Tomcat Log File
Tomcat log file is /hsphere/local/home/cpanel/jakarta/logs/catalina.out.
Jakarta connector log is /hsphere/local/home/cpanel/apache/logs/mod_jk.log.
Tomcat is also restarted with H-Sphere restart (Tomcat is restarted together with CP Apache):
Note: Sometimes you might need to restart only CP Apache, keeping Tomcat running.
Then, use the following option:
Customizing Tomcat Environment Variables
The file ~cpanel/setenv.sh is designed to customize Tomcat environment variables.
For example, to allocate Java memory in the range between 64 MB and 512 MB:
- Login as cpanel user.
- Stop Tomcat.
- Open ~cpanel/setenv.sh:
-bash-2.05b$ vi ~cpanel/setenv.sh
Set the following line in the file:
export CATALINA_OPTS="-Xms64M -Xmx512M"
- Start Tomcat. You will see something like this:
Using external settings -Xms64M -Xmx512M
+ java version 1.4.x
Using CATALINA_BASE: /hsphere/local/home/cpanel/jakarta
Using CATALINA_HOME: /hsphere/local/home/cpanel/jakarta
Using CATALINA_TMPDIR: /hsphere/local/home/cpanel/jakarta/temp
Using JAVA_HOME: /usr/java/jdk
- Check Java to make sure the custom settings are applied:
-bash-2.05b$ ps auwx | grep java
cpanel 3010 99.9 29.6 436776 27652 pts/0 S 05:54 0:09 /usr/java/jdk/bin/java -Xms64M -Xmx512M -Djava.awt.headless=true -Djava.endorsed.dirs=/hsphere/local/home/cpanel/jakarta/common/endorsed -classpath /usr/java/jdk/lib/tools.jar:/hsphere/local/home/cpanel/jakarta/bin/bootstrap.jar:/hsphere/local/home/cpanel/j
cpanel 3020 0.0 0.7 3680 664 pts/0 S 05:54 0:00 grep java