## set uid and gid of process user webproxy ngboss; ## how many process will be started worker_processes 10; ## worker_cpu_affinity define worker_cpu_affinity 000000000100 000000001000 000000010000 000000100000 000001000000 000010000000 000100000000 001000000000 010000000000 100000000000; ## how many open files will be allowd of each process worker_rlimit_nofile 51200; ## error log defind error_log logs/error.log crit; ## save master process-id in file pid logs/nginx.pid; events { ## powered by epoll, good! use epoll; worker_connections 51200; } http { include mime.types; default_type text/html; ## access log format defind log_format main '$remote_addr [$time_local] $request $status $body_bytes_sent'; ## access log defind access_log logs/access.log main; ## fast send file system call, good! sendfile on; tcp_nopush on; tcp_nodelay on; client_body_buffer_size 1024k; proxy_connect_timeout 600; proxy_read_timeout 600; proxy_send_timeout 600; proxy_buffer_size 8k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 1024k; ## set connection timeout (by second) keepalive_timeout 30; ## gzip setting begin. gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 9; gzip_vary off; gzip_types text/plain text/javascript text/css text/xml application/xml; ## gzip setting end. output_buffers 4 32k; postpone_output 1460; client_header_buffer_size 128k; large_client_header_buffers 4 256k; ## default encoding # charset GBK; ## app redirect && load-balancer start # ngboss cluster upstream ngboss_cluster { ip_hash; server 10.238.15.65:7101; server 10.238.15.66:7201; server 10.238.15.67:7301; server 10.238.15.68:7401; } # saleserv cluster upstream saleserv_cluster { ip_hash; server 10.238.15.65:8181; server 10.238.15.66:8281; server 10.238.15.67:8381; server 10.238.15.68:8481; server 10.238.15.65:8182; server 10.238.15.66:8282; server 10.238.15.67:8382; server 10.238.15.68:8482; } # acctmanm cluster upstream acctmanm_cluster { ip_hash; server 10.238.15.65:8191; server 10.238.15.66:8291; server 10.238.15.67:8391; server 10.238.15.68:8491; server 10.238.15.65:8192; server 10.238.15.66:8292; server 10.238.15.67:8392; server 10.238.15.68:8492; } # custmanm cluster upstream custmanm_cluster { ip_hash; server 10.238.15.65:8111; server 10.238.15.66:8211; } # groupserv cluster upstream groupserv_cluster { ip_hash; server 10.238.15.65:8183; server 10.238.15.66:8283; } # salemanm cluster upstream salemanm_cluster { ip_hash; server 10.238.15.65:8121; server 10.238.15.66:8221; } # chnlmanm cluster upstream chnlmanm_cluster { ip_hash; server 10.238.15.65:8101; server 10.238.15.66:8201; } # resmanm cluster upstream resmanm_cluster { ip_hash; server 10.238.15.65:8131; server 10.238.15.66:8231; } # prodmcrm prodmbil bilmanm cluster upstream prodmanm_cluster { server 10.238.15.66:8261; } # copmanm cluster upstream copmanm_cluster { server 10.238.15.66:8271; } # sysmanm cluster upstream sysmanm_cluster { ip_hash; server 10.238.15.65:8141; server 10.238.15.66:8241; } # statmanm cluster upstream statmanm_cluster { ip_hash; server 10.238.15.65:8151; server 10.238.15.66:8251; } ## app redirect && load-balancer end server { listen 10.238.15.101:18080; server_name 10.238.15.101; proxy_set_header X-Forwarded-For $remote_addr; # charset GBK; location /download { root html; proxy_redirect off; } location /saleserv { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://saleserv_cluster; expires max; break; } proxy_pass http://saleserv_cluster; proxy_redirect off; } location /acctmanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://acctmanm_cluster; expires max; break; } proxy_pass http://acctmanm_cluster; proxy_redirect off; } location /custmanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://custmanm_cluster; expires max; break; } proxy_pass http://custmanm_cluster; proxy_redirect off; } location /groupserv { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://groupserv_cluster; expires max; break; } proxy_pass http://groupserv_cluster; proxy_redirect off; } location /salemanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://salemanm_cluster; expires max; break; } proxy_pass http://salemanm_cluster; proxy_redirect off; } location /chnlmanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://chnlmanm_cluster; expires max; break; } proxy_pass http://chnlmanm_cluster; proxy_redirect off; } location /resmanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://resmanm_cluster; expires max; break; } proxy_pass http://resmanm_cluster; proxy_redirect off; } location /prodmcrm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://prodmanm_cluster; expires max; break; } proxy_pass http://prodmanm_cluster; proxy_redirect off; } location /prodmbil { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://prodmanm_cluster; expires max; break; } proxy_pass http://prodmanm_cluster; proxy_redirect off; } location /bilmanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://prodmanm_cluster; expires max; break; } proxy_pass http://prodmanm_cluster; proxy_redirect off; } location /copmanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://copmanm_cluster; expires max; break; } proxy_pass http://copmanm_cluster; proxy_redirect off; } location /sysmanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://sysmanm_cluster; expires max; break; } proxy_pass http://sysmanm_cluster; proxy_redirect off; } location /statmanm { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://statmanm_cluster; expires max; break; } proxy_pass http://statmanm_cluster; proxy_redirect off; } location /nginxstatus { stub_status on; access_log off; allow all; } location / { if ($request_uri ~* ".*\.(js|css|gif|jpg|jpeg|png|bmp|swf)$") { proxy_pass http://ngboss_cluster; expires max; break; } proxy_pass http://ngboss_cluster; proxy_redirect off; } # redirect server error pages to the static page /50x.html error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
详细解决方案
用nginx作weblogic的前端负载均衡器
热度:178 发布时间:2012-06-30 17:20:12.0
相关解决方案
- webLogic,该怎么解决
- weblogic API 怎么上载
- weblogic 12c 怎么配置一般数据源
- weblogic 调度项目出错
- weblogic 文件下载有关问题
- Weblogic Native IO 有关问题一则
- apache,weblogic,websphere这些web服务器,能用asp或asp.net吗?解决办法
- [高手]weblogic server 启动怎么不去部署以前部署过的项目
- weblogic 8.1 公布的应用程序每天老死掉! 在哪里看到日志关于死掉的原因
- 安装BEA.WebLogic.Server.9.1.for.Windows出现的有关问题
- weblogic 健康检查解决方法
- WebLogic Server/Express 8.1 with SP4便是weblogic9.0么
- weblogic 8.1 公布的这样很SQL到数据库 它为什么呢
- weblogic Adminserver起步后,console无法登录
- weblogic lisence.bea,该如何解决
- WEBLOGIC 上部署war
- WEBLOGIC 十 域的创建
- weblogic 端口有关问题
- 小弟我想问一上,用 WEBLOGIC 好,还是 WEBSPHERE好,还是JBUILDER好
- weblogic 监测,jmx,请求
- weblogic 运行几天突然关闭有关问题
- weblogic 8.1初学者级有关问题:关于setWLSEnv.cmd中的classpath
- WebLogic 中JSP标签嵌套有关问题
- weblogic 许可替换有关问题
- 请大家帮忙,“weblogic.servlet.jsp.CompilationException”出现这样的异常,是咋回事
- WEBLOGIC 10 域的创建解决方法
- weblogic 8.1 发布的这样很SQL到数据库 它为什么呢?该怎么处理
- WEBLOGIC 下部署war,该怎么解决
- weblogic 健康检查,该怎么处理
- weblogic 8.1 发布的应用程序每天老死掉! 在哪里看到日志关于死掉的原因解决方法