Integration of Apache and Tomcat in Windows (Vertrigo)

Source: Internet
Author: User

To achieve integration, I found a lot of information online! I tried it many times and finally successfully integrated IT! Next I will share the integration process with you, hoping to help anyone who needs it in the future.

Preparations:

VertrigoServ 2.23: http://sourceforge.net/projects/vertrigo/files/VertrigoServ/2.23/Vertrigo_223.exe/download

2. Tomcat 6.0.18: http://down.51cto.com/data/149175/

3, JDK: http://www.java.net/download/jdk6/6u10/promoted/b32/binaries/jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe if only the application, you can also choose to install JRE, Because JRE is relatively small :)

4, mod_jk-1.2.31-httpd-2.0.52.so: http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.31/mod_jk-1.2.31-httpd-2.0.52.so note JK version must be the same as Apache version. Because vertrigo 2.23 is integrated with apache version Apache 2.0.64, be sure to install the mod_jk-1.2.31-httpd-2.0.52.so. If it is another version, you can download it to the http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.31.

 

Start installation:

The installation sequence of the software can be adjusted appropriately, but JDK (JRE) must be installed before Tomcat:

1. Install JDK (JRE) by default. After the installation is complete, set your system environment variables as follows: My computer> Properties> advanced> environment variables (system variables and non-user variables are to be added here)

JAVA_HOME = C: \ Program Files \ Java \ jre6

CLASSPATH =.; % Java_Home % \ lib \ tools. jar; % Java_Home % \ lib \ dt. jar; PATH = % Java_Home % \ bin

Note that the JAVA_HOME path is changed to your actual installation path. The other two remain unchanged.

2. Install vertrigo 2.23. The installation process is simple. You only need to double-click the installation package and proceed step by step. After the installation is complete, enter http: // 127.0.0.1 in the browser, if the blue configuration page of Welcome to VertrigoServ appears, congratulations, it has been installed successfully. The usage is simple. I will not describe it here.

 

3. install Tomcat and decompress Tomcat to D: \ tomcat and set the environment variables:

CATALINA_BASE = D: \ tomcat CATALINA_HOME = D: \ tomcat CLASSPATH = �talina_home % \ lib \ servlet-api.jar

Run D: \ tomcat \ bin \ startup. bat to start Tomcat. If the Tomcat page appears, the installation is successful.

4. Install JK

Copy the mod_jk-1.2.31-httpd-2.0.52.so to C: \ Program Files \ VertrigoServ \ Apache \ modules (I installed vertrigo on drive C ).

 

Configure the server below:

1. Configure Tomcat to find the conf/server. xml file under the Tomcat directory, and add the following statement in the middle of

<Context path = "" docBase = "D: \ tomcat \ webapps" reloadable = "true" crossContext = "true"/>

Here, if path is not empty, the virtual directory is set. The path value is the virtual directory name, docBase = "D: \ tomcat \ webapps "can be modified based on your actual situation.

Find the conf/workers. properties file in the Tomcat directory and compare the text content below. If there are differences, modify the text below.

Workers. tomcat_home = D: \ tomcat # Let the mod_jk module know the Tomcat location workers. java_home = C: \ Program Files \ Java \ jre6 # 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

If this file does not exist, it is created based on the above content. After any modifications to Tomcat settings are made, the system must be restarted to take effect.

 

2. Configure Apache to open httpd. conf. Add the following code and save it.

LoadModule jk_module modules \ mod_jk-1.2.26-httpd-2.2.4.so # The mod_jk file here is the file JkWorkersFile you downloaded for "D: \ Tomcat \ conf \ workers. properties "# specify the tomcat Listener Configuration File address JkLogFile" D: \ Tomcat \ logs \ mod_jk2.log "# specify the log storage location JkLogLevel info

Find # NameVirtualHost *: 80 and remove.

# Setting up a VM

<VirtualHost *: 80> <Directory "D: \ tomcat \ webapps"> # Select Options Indexes FollowSymLinks AllowOverride all Order Allow based on your actual situation, deny Allow from all </Directory> Options Server Admin webmaster@dummy-host.example.com DocumentRoot "D: \ tomcat \ webapps "# select ServerName test.iddsms.com ErrorLog logs/dummy-host.example.com-error_log CustomLog logs/dummy-host.example.com-access_log common JkMount/serv according to your actual situation Let/* ajp13 # let Apache support servlet transfer for Tomcat to parse JkMount /*. jsp ajp13 # Let Apache support jsp transmission for Tomcat parsing JkMount /*. do ajp13 # enable Apache to support. after all the modifications to Tomcat parsing </VirtualHost> are completed, double-click the Apache icon in the system tray and click Start to Start the Apache service. Enter http: // localhost/in the address bar, respectively. If the result is the same as http: // localhost: 8080/, Apache and Tomcat are integrated successfully.

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.