web.xml
中一定要有<distributable/>
Tomcat的server.xml文件
进行配置Apache24/conf/httpd.conf
Test on alfresco projects
httpd-2.4.25-win64-VC14.zip
apache-tomcat-6.0.48-windows-x64.zip
mod_jk-1.2.42-win64-VC14.zip
web.xml
中一定要有<distributable/>
Tomcat的server.xml文件
进行配置<Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1"> ...... </Engine>
server.xml
文件中找到被注释掉的<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
在注释行的下面添加如下代码摘自:http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8"> <Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/> <Channel className="org.apache.catalina.tribes.group.GroupChannel"> <Membership className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000"/> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="auto" port="4000" autoBind="100" selectorTimeout="5000" maxThreads="6"/> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/> </Sender> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/> </Channel> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""/> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer" tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false"/> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/> </Cluster>
Apache24/conf/httpd.conf
ServerRoot "E:/My-Resources/Apache/httpd-2.4.25-win64-VC14/Apache24"
Listen 192.168.10.152:1314
ServerName 192.168.10.152:1314
allow from all
值<Directory /> AllowOverride none Require all denied allow from all </Directory>
DocumentRoot"E:/My-Resources/Apache/httpd-2.4.25-win64-VC14/Apache24/htdocs" <Directory "E:/My-Resources/Apache/httpd-2.4.25-win64-VC14/Apache24/htdocs"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Require all granted </Directory>
httpd.exe -k install -n Apache
mod_jk-1.2.42-win64-VC14.zip
文件,把mod_jk.so
放进Apache24\modules
目录中Apache24/conf
目录下新建mod_jk.conf
,workers.properties
文件LoadModule jk_module modules/mod_jk.so JkWorkersFile conf/workers.properties JkShmFile logs/mod_jk.shm JkLogFile logs/mod_jk.log JkLogLevel info JkMount /* controller JkMount /jkstatus status
worker.list=controller,status worker.maintain=60 #========tomcat1======== worker.tomcat1.type=ajp13 worker.tomcat1.host=192.168.10.39 worker.tomcat1.port=8017 worker.tomcat1.lbfactor=1 #========tomcat2======== worker.tomcat2.type=ajp13 worker.tomcat2.host=192.168.10.44 worker.tomcat2.port=8009 worker.tomcat2.lbfactor=1 #========controller,负载均衡控制器======== worker.controller.type=lb worker.controller.balance_workers=tomcat1,tomcat2 worker.controller.sticky_session=true #worker.controller.sticky_session_force=1 worker.status.type=status
include conf/mod_jk.conf
Dos命令启动Apache服务: Httpd.exe -w -n “Apache” -k start
参考 :http://www.cnblogs.com/icenter/p/5328383.html
问题
解决办法: 下载vc++2015并安装 https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=48145
解决办法: 使用doc命令启动httpd.exe
通过输出信息,检查配置文件定位问题