The apache2.2.22 and TOMCAT7 are installed first, and the corresponding connector file mod_jk.so is downloaded and stored in the Apache directory modules.
The installation path for my computer is as follows:
1, D:\server\Apache2.2
2, D:\SERVER\TOMCAT7
3. Create a new file under D:\server\Apache2.2\conf workers.properties and add the following
# Define 1 real worker using AJP13
Worker.list=worker1
# Set Properties for Worker1 (AJP13)
Worker.worker1.type=ajp13
Worker.worker1.host=localhost
worker.worker1.port=8009
4, then edit the D:\server\Apache2.2\conf\httpd.conf file, edit the backup, at the end add the following content
#apache +tomcat config start
LoadModule Jk_module modules/mod_jk.so
Jkworkersfile conf/workers.properties
Jklogfile Logs/mod_jk.log
Jkloglevel Debug
Jkmount/*.do Worker1
Jkmount/*.jsp Worker1
#apache +tomcat config End
5. (optional) Configure the virtual directory, add the httpd.conf
Alias/qrcodes "D:/qrcodes"
<directory "D:/qrcodes" >
Options Indexes MultiViews
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
Alias/images "D:/webimages"
<directory "D:/webimages" >
Options Indexes MultiViews
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
Alias/apks "D:/apks"
<directory "D:/apks" >
Options Indexes MultiViews
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
At last
and find DocumentRoot "D:/server/apache2.2/htdocs" changed to DocumentRoot "D:/server/tomcat7/webapps/root"; Find <directory "D :/server/apache2.2/htdocs "> Modified to <directory" D:/server/tomcat7/webapps/root ">
5. Then start the Tomcat and Apache service and enter http://localhost to see the Tomcat management interface.
Note: In httpd.conf, you can configure Apache default home page
<ifmodule dir_module>
DirectoryIndex index.do index.html
</IfModule>