查看NGINX启用了那些模块:

# ./nginx -V
Tengine version: Tengine/2.1. (nginx/1.6.)
built by gcc 4.4. (Red Hat 4.4.-) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/apps/tengine-2.1.
loaded modules:
ngx_core_module (static)
ngx_errlog_module (static)
ngx_conf_module (static)
ngx_dso_module (static)
ngx_syslog_module (static)
ngx_events_module (static)
ngx_event_core_module (static)
ngx_epoll_module (static)
ngx_procs_module (static)
ngx_proc_core_module (static)
ngx_openssl_module (static)
ngx_regex_module (static)
ngx_http_module (static)
ngx_http_core_module (static)
ngx_http_log_module (static)
ngx_http_upstream_module (static)
ngx_http_static_module (static)
ngx_http_autoindex_module (static)
ngx_http_index_module (static)
ngx_http_auth_basic_module (static)
ngx_http_access_module (static)
ngx_http_limit_conn_module (static)
ngx_http_limit_req_module (static)
ngx_http_geo_module (static)
ngx_http_map_module (static)
ngx_http_split_clients_module (static)
ngx_http_referer_module (static)
ngx_http_rewrite_module (static)
ngx_http_ssl_module (static)
ngx_http_proxy_module (static)
ngx_http_fastcgi_module (static)
ngx_http_uwsgi_module (static)
ngx_http_scgi_module (static)
ngx_http_memcached_module (static)
ngx_http_empty_gif_module (static)
ngx_http_browser_module (static)
ngx_http_user_agent_module (static)
ngx_http_upstream_ip_hash_module (static)
ngx_http_upstream_consistent_hash_module (static)
ngx_http_upstream_check_module (static) #nginx的健康检查模块安装了
ngx_http_upstream_least_conn_module (static)
ngx_http_reqstat_module (static)
ngx_http_upstream_keepalive_module (static)
ngx_http_upstream_dynamic_module (static)
ngx_http_stub_status_module (static)
ngx_http_write_filter_module (static)
ngx_http_header_filter_module (static)
ngx_http_chunked_filter_module (static)
ngx_http_range_header_filter_module (static)
ngx_http_gzip_filter_module (static)
ngx_http_postpone_filter_module (static)
ngx_http_ssi_filter_module (static)
ngx_http_charset_filter_module (static)
ngx_http_userid_filter_module (static)
ngx_http_footer_filter_module (static)
ngx_http_trim_filter_module (static)
ngx_http_headers_filter_module (static)
ngx_http_upstream_session_sticky_module (static)
ngx_http_copy_filter_module (static)
ngx_http_range_body_filter_module (static)
ngx_http_not_modified_filter_module (static)

在nginx.conf增加配置文件里的upstream加入健康检 查,如下:

uptream name {
server 192.168.0.21:;
server 192.168.0.22:;
check interval= rise= fall= timeout= type=http;
}
#上面配置的意思是,对name这个负载均衡条目中的所有节点,每个3秒检测一资,请求2资下正常则标记realserver状态为up,如果检测5次都失败,则标记realserver的状态为down,超时间为1秒。

nginx.conf配置文件里的upstream加入健康检查的更多相关文章

  1. [原]生产环境下的nginx.conf配置文件(多虚拟主机)

    [原]生产环境下的nginx.conf配置文件(多虚拟主机) 2013-12-27阅读110 评论0 我的生产环境下的nginx.conf配置文件,做了虚拟主机设置的,大家可以根据需求更改,下载即可在 ...

  2. Nginx入门讲解——初步认识了解nginx.conf配置文件以及配置多个虚拟主机

    本文引自网络进攻学习之用https://blog.csdn.net/weixin_38111957/article/details/81080539 一. 引言上节文章讲述了如何用信号控制Nginx服 ...

  3. Nginx(二)------nginx.conf 配置文件

    上一篇博客我们将 nginx 安装在 /usr/local/nginx 目录下,其默认的配置文件都放在这个目录的 conf 目录下,而主配置文件 nginx.conf 也在其中,后续对 nginx 的 ...

  4. Nginx负载均衡中后端节点服务器健康检查的操作梳理

    正常情况下,nginx做反向代理,如果后端节点服务器宕掉的话,nginx默认是不能把这台realserver踢出upstream负载集群的,所以还会有请求转发到后端的这台realserver上面,这样 ...

  5. Nginx负载均衡中后端节点服务器健康检查的一种简单方式

    摘自:https://cloud.tencent.com/developer/article/1027287 一.利用nginx自带模块ngx_http_proxy_module和ngx_http_u ...

  6. Nginx.conf 配置文件详细说明

    在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络. #运行用户user www-data;    #启动进程,通常设置成和cpu的数量相等worker_process ...

  7. Nginx -- nginx.conf 配置文件详讲

    Nginx服务器配置,nginx.conf文件代码详讲,结合不同楼主的博文得到: #关掉访问日志可以优化服务器 #定义Nginx运行的用户和用户组 #user nobody; #nginx进程数 #如 ...

  8. Nginx nginx.conf配置文件详细说明

    在此记录下Nginx服务器nginx.conf的配置文件说明, 部分注释收集与网络. #运行用户user www-data;    #启动进程,通常设置成和cpu的数量相等worker_process ...

  9. Nginx的nginx.conf配置文件中文注释说明

    #运行用户    user www-data;        #启动进程,通常设置成和cpu的数量相等    worker_processes  1;    #全局错误日志及PID文件    erro ...

随机推荐

  1. 用CSS绘制最常见的形状和图形

    #rectangle { width: 200px; height: 100px; background: red; } #circle { width: 100px; height: 100px; ...

  2. angular指令深度学习篇

    angular指令深度学习-过滤器 limitTo ... <body ng-app="app" > <div ng-controller="myCtr ...

  3. 【bzoj1227】 SDOI2009—虔诚的墓主人

    http://www.lydsy.com/JudgeOnline/problem.php?id=1227 (题目链接) 题意 一个n*m的公墓,一个点上要么是墓地,要么是常青树,给出一个数K,并规定每 ...

  4. spoj 371 Boxes

    N个盒子围成一圈,第i个盒子初始时有Ai个小球,每次可以把一个小球从一个盒子移到相邻的两个盒子之一里.问最少移动多少次使得每个盒子中小球的个数不超过1. ΣAi<=N.1<=N<=1 ...

  5. zTree简单实现

    用zTree简单实现从后台传数据生成树 1.在jsp上引入js,jsp的head完整的部分 <%@ page language="java" contentType=&quo ...

  6. 用 Python、 RabbitMQ 和 Nameko 实现微服务

    用 Python. RabbitMQ 和 Nameko 实现微服务 原创 07-17 17:57 首页 Linux中国 "微服务是一股新浪潮" - 现如今,将项目拆分成多个独立的. ...

  7. wcf第4步之原生调用简单封装

    public interface IDemoServiceChannel : IDemoService, System.ServiceModel.IClientChannel { } public p ...

  8. C#汉字字母数字正则

    http://novell.me/master-diary/2014-11-15/regular-express-csharp-example.html https://msdn.microsoft. ...

  9. [Head First设计模式]山西面馆中的设计模式——建造者模式

    系列文章 [Head First设计模式]山西面馆中的设计模式——装饰者模式 [Head First设计模式]山西面馆中的设计模式——观察者模式 引言 将学习融入生活中,是件很happy的事情,不会感 ...

  10. Coursera-Getting and Cleaning Data-Week3-dplyr+tidyr+lubridate的组合拳

    Coursera-Getting and Cleaning Data-Week3 Wednesday, February 04, 2015 好久不写笔记了,年底略忙.. Getting and Cle ...