文件名称:
tomcat cluster 集群搭建
开发工具:
文件大小: 403kb
下载次数: 0
上传时间: 2019-04-06
详细说明:NULL
博文链接:https://kanpiaoxue.iteye.com/blog/1560016
<1--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper- howto. html -->
I-- Global jndi resources
Documentation at/docs/jndi-resources-howto html
I--The connectors can use a shared executor, you can define one or more named
thread pools-->
<-A"Connector"represents an endpoint by which requests are received
and responses are returned. Documentation at
JavaHttpConnector/docs/config/http.html(blocking&non-blocking)
Java aJP Connector: / docs/ config/ ajp. html
Apr(HttP/ajp)cOnnecTor:/doCs/apR. hTmL
Define a non-ssl Http/1.1 Connector on port 8080
>
中的port=”8090每个 tomcat节点都必须唯一,
node2可以写8091,node3可以写8092,node4可以写8093
<--define a Ssl Http/1.1 Connector on port 8400
This connector uses the jSsE configuration when using apr, the
connector should be using the openssl style configuration
described in the apr documentation -->
connEctorport=8400"protocol="http:/1.1"sslenabled="true
maxthreads=150scheme="https"secure="true
clientauth=false"sslPr
=TLS"/>
中的
port=8100″每个 tomcat节点都必须唯一,noe2可以写8101,node3可以写8102,node4
可以写8103
Membership
className="org. apache. catalina. tribes. membership. McastService
address=228.0.0.4
port="45564
frequency=500
dropTime=3000"7>
Sender
className"org. apache. catalina. tribes. transport Replication Transmitter>
Transport
className="org. apache. catalina. tribes. transport nio Pooled ParallelSender" />
Sendel
Interceptor
className="org. apache. catalina. tribes. group. interceptors Tcp Failure Detector/>
这里给出 Nginx的 conf\nginx. conf的配置:
start
#user nobody;
worker_ processes 1;
#error log logs/error log;
#error log logs/error log notice;
#error log logs errorlog info
logs/nginx pid
events i
worker connections 1024
httpi
mime. ty pes
default type application/ octet-stream
#log format main 'Sremote addr- Sremote user [stime local] "srequest"
'sstatusbodybytessent"shttpreferer
#
Shttpuseragentshttpxforwardedfor
#access log logs/access log main;
sendfile
on;
#tcp nopush
on:
#keepalive timeout 0
keepalive timeout 65
ZIp on,
这里指定需要负载均衡的 tomcat节点的P地址以及端口号
upstream tomcats
server192.168.126.33:8090 weight=1
server192.168.126.33:8091 weight=1
server192.168.126.33:8092 weight=1
server192.168.126.33:8093 weight=1;
server i
listen
80
server name localhost:
larset utf-8
#access log logs/ host access log main
#location "A/Nginx Status/i
t stub status on
access_ log off
location A/WEB-INF/[
deny all
location/i
proxy_passhttp://tomcats
proxy redirect off
proxy_ set header X-Real-IP Sremote_ addr
proxy set header X-Forwarded-For Proxy add x forwarded for
proxy_setheaderHostshttp_host
client max body size 1000m
error_ page 404/html/404. html
redirect server error pages to the static page 50x html
error page 502 503/html/502. html
error_ page 500 504 /50x. html
ocation=/50x. html i
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.