Tomcat 5.5.23 document read tips 4-Manager

Source: Internet
Author: User
This topic describes Tomcat Manager. Tomcat Manager is a built-in Tomcat web app for some management purposes. He can do the following:

(1) deploy a new web application, on a specified context path, from the uploaded contents of a war file.
(2) deploy a new web application, on a specified context path, from the server file system.
(3) list the currently deployed Web applications, as well as the sessions that are currently active for those Web apps.
(4) Reload an existing web application, to reflect changes in the contents of/WEB-INF/classes or/WEB-INF/lib.
(5) list the OS and JVM property values.
(6) list the available global JNDI resources, for use in deployment tools that are preparing <resourcelink> elements nested in a <context> deployment description.
(7) list the available security roles defined in the user database.
(8) Start a stopped application (thus making it available again ).
(9) Stop an existing application (so that it becomes unavailable), but do not undeploy it.
(10) undeploy a deployed Web application and delete its document base Directory (unless it was deployed from File System ).

MANAGER: the context of the Web application is configured in the $ catalina_home/CONF/[enginename]/[hostname] Directory, named manager. xml.

1. In fact, the manager itself has nothing to talk about. It's all about web interfaces. It's okay to go in and have a look. Here we mainly need to talk about the following things: the call/access method of the Manager; configure an account that can use the manager.

2. OK, Manager access and call methods. In addition to directly accessing http: // localhost/manager/html, we can also directly execute a manager function by adding parameters to the URL, such as http: // {Host }:{ port}/manager/{command }? {Parameters}. The advantage is that the manager can easily integrate with some other applications. Other applications use this direct call method to obtain some information in Tomcat. In the next version of manager, Tomcat will consider making it a web service, which makes integration easier. In addition, the manager can be integrated with ant.

3. configure a Manager account. By default, Tomcat does not have a manager account. That is to say, when Tomcat is installed, no one can use the Manager account. This is of course a security consideration. To use manager, configure an account in the $ catalina_home/CONF/tomcat-users.xml file that belongs to the manager role (here the role is equivalent to the group in Linux ). Of course, by configuring realm, we can make this account not configured in the tomcat-users.xml, can also be configured in the database, LDAP, and so on, these things can refer to the configuration of realm. OK, so we can configure it like this:

<User name = "craigmcc" Password = "secret" roles = "standard, Manager"/>

With craigmcc, secret can log on to the Manager web app.

4. In addition to configuring the user name and password, the manager also supports IP restrictions. You need to modify the context configuration of the manager as follows:

Code: select all
<Context path="/manager" debug="0" privileged="true"
         docBase="/usr/local/kinetic/tomcat5/server/webapps/manager">
         <Valve className="org.apache.catalina.valves.RemoteAddrValve"
                allow="127.0.0.1"/>
</Context>



In this way, only the IP address 127.0.0.1 is allowed to access the Manager using the user name and password.

OK. You can easily learn and use other content by logging on to the manager.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.