The status value returned by HTTP and the management of Tomcat WebApp

Source: Internet
Author: User
<span id="Label3"></p><span id="OSC_h3_1"><span id="OSC_h3_1"></span></span>401 Unauthorized<p><p>The current request requires user Authentication. The response must contain a Www-authenticate information header for the requested resource to ask for user Information. The client can repeatedly submit a request that contains the appropriate Authorization header Information. If the current request already contains the Authorization certificate, the 401 response indicates that the certificate has been rejected by the server Authentication. If the 401 response contains the same authentication query as the previous response, and the browser has tried at least one validation, the browser should show the user the entity information contained in the response, because the entity information may contain related diagnostic information. See RFC 2617.</p></p><pre class="brush:xml;toolbar: true; auto-links: false;">222.186.130.186 - - [20/apr/2015:00:33:01 +0800]  "get / http/1.1"  200  2218121.40.83.80 - - [20/Apr/2015:02:01:24 +0800]  "get / http/1.1"  200 2218222.186.58.112 - - [20/Apr/2015:02:06:21 +0800]  "get /  http/1.1 " 200 2218104.149.88.203 - - [20/Apr/2015:03:09:52 +0800] " GET  /?rands=_17940134730019464756219552 http/1.1 " 200 2218104.149.88.203 - - [ 20/apr/2015:03:09:52 +0800]  "get /?rands=_60203975847279471095360 http/1.1"  200  2218104.149.88.203 - - [20/apr/2015:03:09:53 +0800]  "GET /?rands=_ 1641021945027355413326856 http/1.1 " 200 2218104.149.88.203 - - [20/apr/ 2015:03:09:53 +0800]  "get /?rands=_50887264082341248916128 http/1.1"  200  221861.160.247.181 - - [20/apr/2015:03:15:50 +0800]  "get / http/1.1"  200 2218222.186.58.112 - - [20/ apr/2015:03:38:18 +0800]  "get / http/1.1"  200 2218120.132.77.4 - -  [20/Apr/2015:05:24:11 +0800]  "get / http/1.1"  200 2218120.132.77.4 -  - [20/Apr/2015:05:24:11 +0800]  "get / http/1.1"  200  2218222.186.130.186 - - [20/apr/2015:05:29:46 +0800]  "GET / HTTP/1.1"   200 22181.161.59.24 - - [20/apr/2015:06:33:42 +0800]  "CONNECT  vip163mx01.mxmail.netease.com:25 http/1.0 " 400 -222.186.58.97 - - [20/apr/ 2015:06:40:34 +0800]  "get / http/1.1"  200 2218119.167.227.55 - -  [20/apr/2015:07:09:03 +0800]  "get /manager/html http/1.1"  401 2538119.167.227.55  - - [20/apr/2015:07:09:04 +0800]  "get /manager/html http/1.1"  401 2538119.167.227.55 - - [20/apr/ 2015:07:09:04 +0800]  "get /manager/html http/1.1"  401 2538119.167.227.55 -  - [20/Apr/2015:07:09:05 +0800]  "get /manager/html http/1.1"  401  2538119.167.227.55 - - [20/apr/2015:07:09:05 +0800]  "GET /manager/html HTTP /1.1 " 401 2538119.167.227.55 - - [20/Apr/2015:07:09:06 +0800] " get / manager/html http/1.1 " 401 2538119.167.227.55 - - [20/apr/2015:07:09:07 + 0800]  "get /manager/html http/1.1"  401 2538119.167.227.55 - - [20/apr/ 2015:07:09:07 +0800]  "get /manager/html http/1.1"  401 2538119.167.227.55 -  - [20/Apr/2015:07:09:08 +0800]  "get /manager/html http/1.1"  401  2538119.167.227.55 - - [20/apr/2015:07:09:09 +0800]  "get /manager/html http/1.1"  401  2538119.167.227.55 - - [20/apr/2015:07:09:10 +0800]  "GET /manager/html HTTP /1.1 " 401 2538119.167.227.55 - - [20/Apr/2015:07:09:11 +0800] " get / manager/html http/1.1 " 401 2538119.167.227.55 - - [20/apr/2015:07:09:12 + 0800]  "get /manager/html http/1.1"  401 2538119.167.227.55 - - [20/apr/ 2015:07:09:12 +0800]  "get /manager/html http/1.1"  401 2538119.167.227.55 -  - [20/Apr/2015:07:09:13 +0800]  "get /manager/html http/1.1"  401  2538119.167.227.55 - - [20/apr/2015:07:09:14 +0800]  "GET /manager/html HTTP /1.1 " 401 2538119.167.227.55 - - [20/Apr/2015:07:09:15 +0800] " get / manager/html http/1.1 " 401 2538119.167.227.55 - - [20/apr/2015:07:09:15 +0800]  "GET /manager/ html http/1.1 " 401 2538119.167.227.55 - - [20/apr/2015:07:09:16 +0800]   "get /manager/html http/1.1"  401 2538120.132.77.250 - - [20/apr/ 2015:08:49:29 +0800]  "get / http/1.1"  200 2218120.132.77.250 - -  [20/apr/2015:08:49:29 +0800]  "get / http/1.1"  200 2218104.149.88.203 -  - [20/Apr/2015:11:31:57 +0800]  "get /?rands=_32450658764253381376600 http/1.1"  200 2218104.149.88.203 - - [20/Apr/2015:11:31:57 +0800]  "get /?rands= _1208825695617392021475544 http/1.1 " 200 2218104.149.88.203 - - [20/apr/ 2015:11:31:57 +0800]  "get /?rands=_1672858417822134422152172 http/1.1"  200  2218104.149.88.203 - - [20/apr/2015:11:31:58 +0800]  "get /?rands=_50887264082424864967024 http/1.1"  200  2218222.186.58.97 - - [20/apr/2015:12:48:26 +0800]  "GET / HTTP/1.1"   200 2218</pre><p><p>Ok, by analyzing the logs, I can tell that someone must have something to do, so how do I avoid this? <span style="color: rgb(255, 0, 0);"> <strong>So what I'm going to do now is to comment out all the Tomcat-user accounts. </strong></span></p></p><span id="OSC_h3_2"><span id="OSC_h3_2"></span></span>2. Manage Web Apps with Tomcat<p><p>Web apps can be managed via web addresses without having to restart the service Ha. read the documentation below.<br></p></p><p><p>Http:///docs/manager-howto.html</p></p><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">In many production environments, it's very useful to has the capability to deploy a new web application, or undeploy an Existing one, without has to shut down and restart the entire container.</p></p><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">In a production environment, you can deploy a Web service without restarting the entire container.</p></p><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">In addition, can request a existing application to reload itself, even if you had not declared it to is in the <code>reloadable </code> Tomcat Server Configuration File.</p></p><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">You can have an existing web App reload Itself.</p></p><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">To the These capabilities, Tomcat includes a Web application (installed by default on the context path <code>/manager</code> ) that supports The following functions:</p></p><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">Tomcat supports the following management functions by default in the Path/manager way.</p></p> <ul> <li><li><p>Deploy a new Web application from the uploaded contents of a WAR file.</p></li></li> <li><li><p>Deploy a new web application, specified context path, from the server file System.</p></li></li> <li><li><p>List the currently deployed Web applications, as well as the sessions that is currently active for those web Apps.</p></li></li> <li><li><p>Reload an existing Web application, to reflect changes in <code>/WEB-INF/classes</code> the contents of or <code>/WEB-INF/lib</code> . from the new reprint of existing applications, including classes and Lib files</p></li></li> <li><li><p>List the OS and JVM property Values.</p></li></li> <li><li><p>List the available global JNDI resources, for use with deployment tools that is preparing <code><ResourceLink></code> elements nested in a <code><Context></code> D Eployment Description.</p></li></li> <li><li><p>Start a stopped application (thus making it available again).</p></li></li> <li><li><p>Stop an existing application (so-it becomes unavailable), but does not undeploy it.</p></li></li> <li><li><p>Undeploy a deployed Web application and delete its document base directory (unless It is deployed from file system).</p></li></li> </ul><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">A default Tomcat installation includes the Manager. To add an instance of the Manager Web application to <code>Context</code> a new host install the <code>manager.xml</code> context configuration file in the< c2/> Folder. Here are an example:</p></p><pre><pre><context privileged= "true" antiresourcelocking= "false" docbase= "${catalina.home}/webapps/manager" > <Valv E classname= "org.apache.catalina.valves.RemoteAddrValve" allow= "127\.0\.0\.1"/></context></pre></pre><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">If you have the Tomcat configured to the support multiple virtual hosts (websites), you would need to configure a Manager for Each.</p></p><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);"><p style="border-collapse: separate; font-family: Simsun; font-size: medium; line-height: normal; white-space: normal; background-color: rgb(255, 255, 255);">There is three ways to use the <strong>Manager</strong> Web Application.</p></p> <ul> <ul> <li><p>As a application with a user interface your use in your browser. Here is a example URL where you can replace with <code>localhost</code> your website host name: <code>http://localhost/manager/html/</code> .</p></li> <li><p>A minimal version using HTTP requests only which are suitable for use by Scripts setup by System Administrators. Commands is given as part of the request URI, and responses is in the form of simple text that can be easily parsed and Processed. See supported Manager Commands for more Information.</p></li> <li><p>A convenient set of task definitions for the <em>Ant</em> (version 1.4 or Later) build Tool. See executing Manager Commands with Ant for more Information.</p></li> </ul> </ul><p><p>The status value returned by HTTP and the management of Tomcat WebApp</p></p></span>
Related Article

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.