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
may be presisted by using the persist command. This document
focuses on the text interface. For further information about the graphical
interface, see
Host Manager App -- HTML 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:/tomcat9, or
/usr/share/tomcat9.

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 text 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-script"/>

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