Integration of Apache and Tomcat in Windows (Vertrigo) _ PHP Tutorial

Source: Internet
Author: User
Integration of Apache and Tomcat in Windows (Vertrigo. 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. I hope to help anyone who needs it in the future. in order to achieve integration, I have 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 in the Tomcat directory. Add the following statement in the middle to modify its default directory:

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

# Select Options Indexes FollowSymLinks AllowOverride all Order Allow, Deny Allow from all according to your actual situation 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/servlet/* ajp13 # let Apache support servlet transfer, use Tomcat to parse JkMount /*. jsp ajp13 # let Apache support jsp transmission for Tomcat parsing JkMount /*. do ajp13 # enable Apache to support. do transmission for Tomcat parsing After all the modifications 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.

Success! I tried it many times and finally successfully integrated it! Next I will share the integration process with you, hoping to help people who need it in the future...

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.