zoukankan      html  css  js  c++  java
  • tengine 配置集群、监控

    #user  nobody;
    worker_processes  1;
    
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    #pid        logs/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    
    # load modules compiled as Dynamic Shared Object (DSO)
    #
    #dso {
    #    load ngx_http_fastcgi_module.so;
    #    load ngx_http_rewrite_module.so;
    #}
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
    
        #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
        #                  '$status $body_bytes_sent "$http_referer" '
        #                  '"$http_user_agent" "$http_x_forwarded_for"';
    
        #access_log  logs/access.log  main;
    
        sendfile        on;
        #tcp_nopush     on;
    
        #keepalive_timeout  0;
        keepalive_timeout  65;
    
        #gzip  on;
        
        upstream local_tomcat {
            ip_hash;
                    server 192.168.1.220:7001;
                    server 192.168.1.220:7002;
                
                    check interval=3000 rise=2 fall=5 timeout=1000 type=http;
                    check_keepalive_requests 100;
                    check_http_send "GET /arch HTTP/1.0
    
    ";
                    check_http_expect_alive http_2xx http_3xx;
            }
    
        server {
            listen       7000;
            server_name  localhost;
    
            #charset koi8-r;
    
            #access_log  logs/host.access.log  main;
    
            location / {
                proxy_pass http://local_tomcat;
            }
        
                    location = /nginx_status {
                        stub_status on;
                        
                        allow 10.10.22.96;
                        deny all;
                    }
    
                    location /status {
                        check_status;
                        access_log   off;
                
                        allow 10.10.22.96;
                        deny all;
                    }
        }  
    }
  • 相关阅读:
    单独设置css的class属性
    理解闭包的使用方法
    npm常用命令和总结
    前端调试之服务器
    gulp 报错的处理——个人经验
    工作经验备忘
    c++:虚函数和纯虚函数(转载)
    snmp学习、配置
    sigar学习
    linux安装VSCode
  • 原文地址:https://www.cnblogs.com/rigid/p/10237186.html
Copyright © 2011-2022 走看看