Monitor JK-1.2.40 connection status, jkstatusjk-1.2.40 through jkstatus

Source: Internet
Author: User

Monitor JK-1.2.40 connection status, jkstatusjk-1.2.40 through jkstatus

/* Through jkstatus monitoring JK-1.2.40 connection status * running * configuration jkstatus * 0) This article is based on the integration of Apache and Tomcat using JK, the integration process see http://blog.csdn.net/jadyer/article/details/39613523 * 1) in workers. add two lines to the properties file: worker. list = status (actually worker. list = status, tomcat) and worker. status. type = status * 2) add a line under the <Directory/> label in the httpd-vhosts.conf file: JkMount/jkstatus status * 3) Restart apache and access http in the browser: // 192.168.0.103/jkstatus, the default access does not require the password * optional * configure the password to access jkstatus * 1) modify the httpd-vhosts.conf file, add the following content under the <Directory/> label * <Location/jkstatus> * Options MultiViews * AuthType Basic # Basic verification * AuthName "Auther Center" # the pop-up box prompts * AuthUserFile conf/. htpasswd # password storage location * require valid-user granted # only. users in the htpasswd file can enter * </Location> * 2) generate the password file * run the command [/app/apache/bin/htpasswd-c/app/apache/conf /. htpasswd admin], which is used to generate a password file containing the user admin *. At the same time, you will be asked to enter the new user admin password twice, finally, you can see the generated password file through [ls-al] (it is a hidden file, you need-a to see) * 3) change the password * htpasswd-m. htpasswd username * 4) Delete the user * htpasswd-D. htpasswd username * 5) The last restart apache can be * done * @ create Sep 27,201 4 3:36:34 * @ author Xuan Yu 



How to connect Apache to tomcat

Introduction to three Connection Methods for Apache and Tomcat
First, let's explain why Apache and Tomcat need to be connected. In fact, Tomcat itself already provides the HTTP service. The default port of this service is 8080. After tomcat is installed, you can directly use the application run by Tomcat through port 8080, you can also change the port to 80.

Since Tomcat itself can provide such services, why should we introduce Apache or some other specialized HTTP servers? The reasons are as follows:

1. Improve the processing performance of static files

2. Use Web servers for load balancing and fault tolerance

3. seamless application upgrade

These three points are very important to a web site. We hope that our website will not only be fast but also stable, users cannot access the server because a Tomcat instance is down or a program is upgraded. The best HTTP server that can complete these functions is the apache http server, it is the most closely and reliable combination with tomcat.

Next we will introduce three methods to integrate apache and tomcat.

I. JK

This is the most common method. You can find a lot of web pages about JK configuration on the Internet. Of course, the most comprehensive is the official documentation. JK itself has two versions: 1 and 2. The latest version of 1 is 1.2.19, and Version 2 has been abandoned. Later versions will not be released, therefore, we recommend that you use version 1.

JK communicates with the Tomcat server through the AJP protocol. The default port of the Tomcat AJP Connector is 8009. JK provides a page for monitoring and management of jkstatus. jkstatus can be used to monitor the current running status of JK and set the connection to tomcat, as shown in

In this figure, we can see that JK is configured with two connections to ports 8109 and 8209 respectively. Currently, the connection s2 is stopped, the connection s1 has processed more than 0.47 million requests since the last restart, with the traffic reaching 6.2 GB and the maximum concurrency being 13. We can also use the jkstatus management function to switch JK to different Tomcat servers. For example, we can enable s2 and disable s1, which is very useful when updating applications, in addition, the entire switchover process is transparent to users, achieving seamless upgrade. There have been a lot of articles about JK configuration on the Internet. Here we will not detail the entire configuration process, but I want to talk about the configuration ideas, as long as I understand the configuration ideas, JK is a very flexible component.

JK configuration has three most critical files:

Httpd. conf

The configuration file of the Apache server, used to load the JK module and specify the JK configuration file information.

Workers. properties

Connection definition file to Tomcat server

Uriworkermap. properties

URI ing file, used to specify which URLs are processed by Tomcat, you can also directly in httpd. conf configures these Uris, but the advantage of independent configuration is that the JK module regularly updates the content of this file, so that we do not need to restart the Apache server when modifying the configuration.

The second and third configuration file names can be customized. The following is a typical httpd. conf configuration for JK.

# (Httpd. conf)

# Load the mod_jk Module

LoadModule jk_module modules/mod_jk.so

#

# Configure mod_jk

#

JkWorkersFile conf/workers. properties

JkMountFile conf/uriworkermap. properties

JkLogFile logs/mod_jk.log

JkLogLevel warn

... The remaining full text>
 
When the Ethernet port e1/0 of the router is connected to the PC, the status of the port e1/0 is UP, but the PROTOCOL is DOWN.

If your vro, PC, and vswitch are all configured, this may be caused by a wrong line. A cross line is used for connecting the PC and vro, and a direct line is used for connecting the vro and vswitch.
If you use PT, send me what you did. Qq mail: 292849529.qq.com

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.