TurnKey Linux Virtual Appliance Library

Tomcat on Apache


Java Servlet and JSP Platform

Tomcat is a servlet container that implements the Java Servlet and the JavaServer Pages (JSP) specifications, and provides a "pure Java" HTTP web server environment for Java code to run in. Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations.

Stable version: 14.1 (changelog)

This appliance integrates Tomcat with the Apache web server. When a fully featured web server is not required, consider using the Standalone Tomcat Appliance.

This appliance includes all the standard features in TurnKey Core, and on top of that:

  • Tomcat on Apache configurations:
    • TurnKey web control panel in /var/lib/tomcat7/webapps/cp

      /etc/tomcat7/mod_jk.conf redirects the root web page to the control panel:

      RedirectMatch ^/$ /cp
    • All components installed from package management.
    • Using OpenJDK Java runtime.
    • Deployed web applications in /var/lib/tomcat7/webapps.
    • TurnKey web control panel in /var/lib/tomcat7/webapps/cp.
    • JSP console output sent to syslog (/var/log/syslog).
    • Created Tomcat admin/manager roles and admin user.
    • Use Apache2 Jk loadbalancer connector (performance).
    • JkMounts for admin, manager, host-manager applications (convenience).
    • Bind Tomcat AJP connector to localhost (security).
    • Removed Tomcat HTTP connector listener (security).
    • Set system wide Tomcat and Java environment variables.
  • Includes MySQL.
  • SSL support out of the box.
  • Includes Webmin module for configuring Apache2 and MySQL.

See the Tomcat on Apache docs for further details.

Usage details & Logging in for Administration

No default passwords: For security reasons there are no default passwords. All passwords are set at system initialization time.

Ignore SSL browser warning: browsers don't like self-signed SSL certificates, but this is the only kind that can be generated automatically without paying a commercial Certificate Authority.

Username for tomcat administration applications:

Login as username admin

Web - point your browser at either:

  1. - not encrypted so no browser warning
  2. - encrypted with self-signed SSL certificate

Username for database administration:

Login as MySQL username root at

  1. - Adminer database management web app
  2. MySQL command line tool:
    $ mysql --user root --password
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Username for OS system administration:

Login as root except on AWS marketplace which uses username admin.

  1. Point your browser to:
  2. Login with SSH client:
    ssh root@

    Special case for AWS marketplace:

    ssh admin@

* Replace with a valid IP or hostname.