The Apache Tomcat Servlet/JSP Container

Apache Tomcat 7

Version 7.0.88, May 7 2018
Apache Logo


User Guide


Apache Tomcat Development

Host Manager App -- HTML Interface

Table of Contents

The Tomcat Host Manager application enables you to create, delete, and otherwise manage virtual hosts within Tomcat. This how-to guide is best accompanied by the following pieces of documentation:

The Tomcat Host Manager application is a part of Tomcat installation, by default available using the following context: /host-manager. You can use the host manager in the following ways:

  • Utilizing the graphical user interface, accessible at: {server}:{port}/host-manager/html.
  • Utilizing a set of minimal HTTP requests suitable for scripting. You can access this mode at: {server}:{port}/host-manager/text.

Both ways enable you to add, remove, start, and stop virtual hosts. Changes are not persisted to the Tomcat configuraiton files. If you want your settings to be persistent, you must write them into the server.xml configuration file manually. For full documentation about the configuration, see The Host Container. This document focuses on the HTML interface. For further information about the graphical interface, see Host Manager App -- Text Interface.

Configuring Manager Application Access

The description below uses $CATALINA_HOME to refer the base Tomcat directory. It is the directory in which you installed Tomcat, for example C:\tomcat8, or /usr/share/tomcat8.

The Host Manager application requires a user with one of the following roles:

  • admin-gui - use this role for the graphical web interface.
  • admin-script - use this role for the scripting web interface.

To enable access to the HTML interface of the Host Manager application, either grant your Tomcat user the appropriate role, or create a new one with the correct role. For example, open ${CATALINA_BASE}/conf/tomcat-users.xml and enter the following:

<user username="test" password="chang3m3N#w" roles="admin-gui"/>

No further settings is needed. When you now access {server}:{port}/host-manager/html,you are able to log in with the created credentials.

Note that in case you retreive your users using the DataSourceRealm, JDBCRealm, or JNDIRealm mechanism, add the appropriate role in the database or the directory server respectively.

Interface Description

The interface is divided into six sections:

  • Message - Displays success and failure messages.
  • Host Manager - Provides basic Host Manager operations , like list and help.
  • Host name - Provides a list of virtual Host Names and enables you to operate them.
  • Add Virtual Host - Enables you to add a new Virtual Host.
  • Server Information - Information about the Tomcat server.

Displays information about the success or failure of the last Host Manager command you performed:

  • Success: OK is displayed and may be followed by a success message.
  • Failure: FAIL is displayed followed by an error message.

Note that the console of your Tomcat server may reveal more information about each command.

Host Manager

The Host Manager section enables you to:

  • List Virtual Hosts - Refresh a list of currently-configured virtual hosts.
  • HTML Host Manager Help - A documentation link.
  • Host Manager Help - A documentation link.
  • Server Status - A link to the Manager application. Note that you user must have sufficient permissions to access the application.
Host Name

The Host name section contains a list of currently-configured virtual host names. It enables you to:

  • View the host names
  • View the host name aliases
  • Perform basic commands, that is start, stop, and remove.
Add Virtual Host

The Add Virtual Host section enables you to add a virtual host using a graphical interface. For a description of each property, see the Host Manager App -- Text Interface documentation. Note that any configuration added via this interface is non-persistent.

Server Information

Provides a basic information about the currently-running Tomcat instance, the JVM, and the underlying operating system.


Notice: This comments section collects your suggestions on improving documentation for Apache Tomcat.

If you have trouble and need help, read Find Help page and ask your question on the tomcat-users mailing list. Do not ask such questions here. This is not a Q&A section.

The Apache Comments System is explained here. Comments may be removed by our moderators if they are either implemented or considered invalid/off-topic.

Copyright © 1999-2018, Apache Software Foundation