windows下部署Apache2.4+tomcat7

一、apache下载,官网只提供源码,采用第三方下载:https://www.apachehaus.com/cgi-bin/download.plx   

     tomcat:https://tomcat.apache.org/download-70.cgi

     tomcat-connectors:http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/  编译获取mod_jk.so

     Apache2.2:

  • http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.40-windows-i386-httpd-2.2.x.zip

     Apache2.4\32\64:

  • http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.40-windows-i386-httpd-2.4.x.zip
  • http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.40-windows-x86_64-httpd-2.4.x.zip

二、将对应版本的mod_jk.so放入../Apache24/modules 文件夹下

三、Apache httpd.conf配置

       需要更改的配置-------

      Define SRVROOT "D:\BaiduNetdiskDownload\Apache24"
      ServerRoot "${SRVROOT}"

      Listen 8080

      ServerName localhost

      在最后添加Tomcat配置

# Load mod_jk module
LoadModule jk_module modules/mod_jk.so

# Add the module (activate this lne for Apache 1.3)
# AddModule     mod_jk.c
# Where to find workers.properties
JkWorkersFile "D:/ldwTomcat/apache-tomcat-7.0.85/conf/workers.properties" 
# Check the path is correct to your workers.properties 
# Where to put jk shared memory
JkShmFile     logs/mod_jk.shm
# Where to put jk logs
JkLogFile "D:/ldwTomcat/apache-tomcat-7.0.85/logs/mod_jk.log" 
# Set the jk log level [debug/error/info]
JkLogLevel    info 

JkMount /* worker1

四、创建workers.properties放入tomcat/conf文件夹下

 

worker.list=worker1,jkstatus

#Set properties for worker19 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009 
worker.worker1.ping_timeout=1000
worker.worker1.connect_timeout=10000
worker.worker1.prepost_timeout=10000
worker.worker1.socket_timeout=10
worker.worker1.connection_pool_timeout=60
worker.worker1.connection_pool_size=90
worker.worker1.retries=2
worker.worker1.reply_timeout=300000 

# status worker
worker.jkstatus.type=status

五、tomcat server.xml配置,正常项目配置

 

httpd.exe -k install 将apache添加到系统服务

net start Apache2.4 --启动不了,直接在命令行输入httpd.exe,查看错误信息

net stop Apache2.4

windows下部署Apache2.4+tomcat7_第1张图片

 

你可能感兴趣的:(工具)