Apache + Tomcat (in Windows) Integration

Source: Internet
Author: User
Apache + Tomcat (in Windows) Integration preparation: • Apache installation software (such as apache2.2) • tomcat installation software (such as tomcat7.0) • JRE: http://java.sun.com/j2se/1.5.0/download.jsp install JDK (because JDK has JRE) • JK-apache-2.0.55 (jk): The same license version, JK format is not all ". "So"] Start installation: [Note: the installation sequence can be adjusted as appropriate, but JRE must be installed before Tomcat] • Install JRE (or JDK) [Note: Configure environment variables: java_home = D: \ Java \ jre1.5.0 _ 06 Path = D: \ Java \ jre1.5.0 _ 06 \ bi N] • install Apache [Note: After the installation is complete, stop the apache service. You can view its icon on the tray of the window and double-click the icon, in the displayed window, select "Open Apache monitor", click Stop] • install Tomcat [Note: After installation is complete, open the browser and enter the URL http: // 127.0.0.1: 8080 view] • JK installation copies mod_jk.so to the modules folder under the Apache installation directory (for example, D: \ apache \ apache2 \ modules ). Choose run> cmd> D: \ apache \ apache2 \ bin \ apache.exe "-T. If syntax OK is displayed, the Apache configuration is correct. Configure the server • configure Tomcat and create workers in the conf folder of Tomcat. add the following content to the properties file: workers. tomcat_home = D: \ Tomcat # Let the mod_jk module know the Tomcat location workers. java_home = D: \ Java \ jre1.5.0 _ 06 # Let the mod_jk module know the JRE position PS = \ worker. list = ajp13 # module version worker. ajp13.port = 8009 # Working port. Do not modify worker if it is not occupied. ajp13.host = localhost # This machine. If the above Apache host is not localhost, modify worker accordingly. ajp13.type = ajp13 # type worker. ajp13.lbfactor = 1 # Number of proxies, no need to modify • configure Apache (set the connection between APACHE and tomcat so that when Apache encounters a JSP file To tomcat.) Open httpd under D: \ apache \ apache2 \ conf. conf, add the following code and save: loadmodule jk_module modules/mod_jk.so # The mod_jk file here is the file jkworkersfile "D:/tomcat/CONF/workers you downloaded. properties "# specify the Tomcat Listener Configuration File address jklogfile" D:/tomcat/logs/mod_jk2.log "# specify the log storage location jkloglevel info in Apache CONF/httpd. set the virtual host in conf: <virtualhost localhost> serveradmin localhostdocumentroot D:/test1 # path of your site project, which should be the same as the directory in Tomcat: directoryindex inde X.html index.htm index. jsperrorlog logs/shsc-error_log.txtCustomLog logs/shsc-access_log.txt commonjkmount/servlet/* ajp13 # Let Apache support servlet transfer, for Tomcat parsing jkmount /*. JSP ajp13 # Let Apache support JSP transmission for Tomcat parsing jkmount /*. do ajp13 # enable Apache to support. do transmission, which is used for Tomcat parsing </virtualhost> CONF/Server under tomcat. XML settings VM: Under the <engine> label

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.