JK installation configuration JK is used to integrate Apache and tomcat. 1. Install jkwget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.40-src.tar.gztar-xvf tomcat-connectors-1.2.40-src.tar.gz CD tomcat-connectors-1.2.40-src/native /. /configure -- With-apxs =/usr/local/Apache/bin/apxs makels. /Apache-2.0/mod_jk.socp. /Apache-2.0/mod_jk.so/usr/local/Apache/modules/2. Configure jkcd/usr/local/Apache/confcat> mod_jk.conf in apache <-'eof' # specify mod_jk work required for module work File workers. properties location jkworkersfile/usr/local/Apache/CONF/workers. properties # where to put JK logs jklogfile/usr/local/Apache/logs/mod_jk.log # Set the jk log level [debug/error/info] jkloglevel info # select the log format jklogstampformat" [% A % B % d % H: % m: % S % Y] "# jkoptions indicate to send SSL key size, # jkoptions + forwardkeysize + forwarduricompat-forwarddirectories # jkrequestlogformat set The request format jkrequestlogformat "% w % v % t" # Send all Servlet and JSP requests to Tomcat through the ajp13 protocol so that Tomcat can process jkmount/servlet/* worker1jkmount /*. JSP worker1eofcat> workers. properties <-'eof '# workers. properties is the work order of the forwarding module, used to define the forwarding host, listening port and other content worker. list = worker1 # Set Properties for worker1worker. worker1.type = ajp13worker. worker1.host = localhostworker. worker1.port = 8009worker. worker1.lbfactor = 50 # worker. worker1.cache Size = 10 # worker. worker1.cache _ timeout = 600 # worker. worker1.socket _ keepalive = 1 # worker. worker1.socket _ timeout = 300 eofcat> httpd. conf <-'eof 'loadmodule jk_module modules/mod_jk.soinclude CONF/modules-I s # loadmodule socache_shmcb_module modules/modules # httpd. conf: Modify Tomcat server. XML is added to the host. <Context Path = "" docbase = "/usr/local/Apache/htdocs/" DEBUG = "0" reloadable = "true" crosscontext = "true"/> test index. JSP <HTML> <body> <center> now time is: <% = new Java. util. date () %> </center> </body>
JK installation configuration notes