Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Apache Jserv protocol

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The protocol mainly transmits data in binary format rather than text format. The use of TCP and packet-based protocols increases the performance of WEB servers.

Mod_jk and mod_proxy are based on the AJP protocol. Mod_jk is an AJP connector that is often used to integrate web servers with tomcat, such as Apache or IIS.

Download address: http://tomcat.apache.org/download-connectors.cgi (1) for decompression

[root@localhost opt] # tar-zxvf tomcat-connectors-2.2.x-src.tar

(2) run the configuration command

[root@localhost opt] # tar-zxvf tomcat-connectors-2.2.x-src.tar

(3) then run the compile command

[root@localhost apache-2.0] # make

(4) installation

Root@localhost apache-2.0] # make install

(5) copy the module to the modules directory of apache [root@localhost apache-2.0] # cp mod_jk.so / opt/apache-2.2.19/modules/chmod 755 mod_jk.so (6) Edit the configuration file [root@localhost apache-2.0] # cd / opt/apache-2.2.19/confvi mod-jk.confLoadModule jk_module modules/mod_jk.soJkWorkersFile conf/workers.propertiesJkLogFile logs/mod_jk.logJkLogLevel infoJkMount / sample/* node1

Create a file named workers.properties in the same directory

[root@localhost conf] # vi workers.propertiesworker.list=node1worker.node1.port=8009worker.node1.host=10.130.240.51worker.node1.type=ajp13worker.node1.lbfactor=1

Details of the configuration file:

Node name: usually the name of the host

Tocmcat accepts AJP port: default is 8009

IP address of tomcat

Protocol used

The method of load balancing

(7) Edit the httpd.conf file and include the file we just created.

Include conf/mod_jk.conf

(8) restart apache server 3. Mod_proxy configuration

It's a little easier than configuring mod_jk,mod_proxy.

(1) Open the httpd.conf configuration file and add the following content: LoadModule proxy_module modules/mod_proxy.soLoadModule proxy_http_module modules/mod_proxy_http.soNameVirtualHost * ServerName abc.comProxyRequests OffOrder deny,allowAllow from allProxyPass / http://localhost:8080/ProxyPa***everse / http://localhost:8080/Order allow,denyAllow from all (2) Save the configuration file and restart the server.

Comparison between mod_jk and mod_proxy:

Feature mod_jk mod_proxyLoad balancing High level BasicManagement interface Yes NoCompilation Separate process Not required. By default comes with ApacheConfiguration Huge BasicProtocol AJP HTTP/HTTPS/AJPNode failure Advance NA

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report