File: html-host-manager-howto.xml

package info (click to toggle)
tomcat11 11.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,028 kB
  • sloc: java: 366,244; xml: 55,681; jsp: 4,783; sh: 1,304; perl: 324; makefile: 25; ansic: 14
file content (212 lines) | stat: -rw-r--r-- 7,721 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE document [
  <!ENTITY project SYSTEM "project.xml">
]>

<document url="html-host-manager-howto.html">
  &project;

  <properties>
        <title>Host Manager App -- HTML Interface</title>
  </properties>
<body>
  <section name="Table of Contents">
    <toc/>
  </section>
  <section name="Introduction">
    <p>
      The <strong>Tomcat Host Manager</strong> 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:
    </p>
    <ul>
      <li>
        <a href="virtual-hosting-howto.html">Virtual Hosting How-To</a> for more
        information about virtual hosting.
      </li>
      <li>
        <a href="config/host.html">The Host Container</a> for more information
        about the underlying xml configuration of virtual hosts and description
        of attributes.
      </li>
      <li>
        <a href="host-manager-howto.html">Host Manager App -- Text Interface</a>
        for full description of the commands.
      </li>
    </ul>

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

    <ul>
      <li>
        Utilizing the graphical user interface, accessible at:
        <code>{server}:{port}/host-manager/html</code>.
      </li>
      <li>
        Utilizing a set of minimal HTTP requests suitable for scripting.
        You can access this mode at:
        <code>{server}:{port}/host-manager/text</code>.
      </li>
    </ul>
    <p>
      Both ways enable you to add, remove, start, and stop virtual hosts.
      Changes may be persisted by using the <code>persist</code> command. This
      document focuses on the HTML interface. For further information about the
      graphical interface, see
      <a href="host-manager-howto.html">Host Manager App -- Text Interface</a>.
    </p>
  </section>

  <section name="Configuring Manager Application Access">
    <p><em>The description below uses <code>$CATALINA_HOME</code> to refer the
      base Tomcat directory. It is the directory in which you installed
      Tomcat, for example <code>C:\tomcat9</code>, or
      <code>/usr/share/tomcat9</code>.</em></p>

    <p>
      The Host Manager application requires a user with one of the following
      roles:
    </p>

    <ul>
      <li>
        <code>admin-gui</code> - use this role for the graphical web interface.
      </li>
      <li>
        <code>admin-script</code> - use this role for the scripting web interface.
      </li>
    </ul>

    <p>
      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
      <code>${CATALINA_BASE}/conf/tomcat-users.xml</code> and enter the following:
    </p>
    <source><![CDATA[<user username="test" password="chang3m3N#w" roles="admin-gui"/>]]></source>
    <p>
      No further settings is needed. When you now access
      <code>{server}:{port}/host-manager/html</code>,you are able to
      log in with the created credentials.
    </p>
    <p>
      If you are using a different realm you will need to add the necessary role
      to the appropriate user(s) using the standard user management tools for
      that realm.
    </p>
  </section>

  <section name="Interface Description">
    <p>The interface is divided into six sections:</p>
    <ul>
      <li><strong>Message</strong> - Displays success and failure messages.</li>
      <li><strong>Host Manager</strong> - Provides basic Host Manager operations
      , like list and help.</li>
      <li><strong>Host name</strong> - Provides a list of virtual Host Names and
      enables you to operate them. </li>
      <li><strong>Add Virtual Host</strong> - Enables you to add a new Virtual
      Host.</li>
      <li><strong>Persist configuration</strong> - Enables you to persist your
      current Virtual Hosts.</li>
      <li><strong>Server Information</strong> - Information about the Tomcat
          server.</li>
    </ul>
  </section>

  <section name="Message">

  <p>
  Displays information about the success or failure of the last Host Manager
  command you performed:
  </p>
  <ul>
    <li>Success: <strong>OK</strong> is displayed
    and may be followed by a success message.</li>
    <li>Failure: <strong>FAIL</strong>
    is displayed followed by an error message.</li>
  </ul>
  <p>
    Note that the console of your Tomcat server may reveal more information
    about each command.
  </p>
  </section>

  <section name="Host Manager">

  <p>The Host Manager section enables you to:</p>
  <ul>
    <li><strong>List Virtual Hosts</strong> - Refresh a list of
    currently-configured virtual hosts.</li>
    <li><strong>HTML Host Manager Help</strong> - A documentation link.</li>
    <li><strong>Host Manager Help</strong> - A documentation link.</li>
    <li><strong>Server Status</strong> - A link to the <strong>Manager</strong>
    application. Note that you user must have sufficient permissions to access
    the application.</li>
  </ul>
  </section>

  <section name="Host Name">

  <p>The Host name section contains a list of currently-configured virtual host
    names. It enables you to:</p>
  <ul>
    <li>View the host names</li>
    <li>View the host name aliases</li>
    <li>Perform basic commands, that is <strong>start</strong>,
    <strong>stop</strong>, and <strong>remove</strong>.</li>
  </ul>
  </section>

  <section name="Add Virtual Host">

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

  <section name="Persist Configuration">

  <p>The Persist Configuration section enables you to persist your current
  configuration into the <i>server.xml</i> file.</p>

  <p> This functionality is disabled by default. To enable this option, you must
  configure the <code>StoreConfigLifecycleListener</code> listener first.
  To do so, add the following listener to your <i>server.xml</i>:</p>
  <source><![CDATA[<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>]]></source>

  <p>After you configure the listener, click <strong>All</strong> to make your
  configuration persistent.</p>
  </section>

  <section name="Server Information">
    <p>
      Provides a basic information about the currently-running Tomcat instance,
      the JVM, and the underlying operating system.
    </p>
  </section>

</body>
</document>