nginx 负载均衡配置文件

worker_processes  8;
worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;
worker_rlimit_nofile 409600;
events {
    use epoll;
    worker_connections  204800;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    tcp_nopush  on;
    tcp_nodelay on;
    keepalive_timeout  65;
    server_tokens       off;
    server_names_hash_bucket_size       128;
    upstream BeaconWeb{
        server 10.125.42.81;
        server 10.125.42.83;
        server 10.125.42.84;
        }
    log_format  ups  '$remote_addr [$time_local]  $request $status '
                     'u_content_t $upstream_http_content_type '
                     'u_addr $upstream_addr '
                     'u_status $upstream_status '
                     'u_rsp_ti $upstream_response_time '
             '$http_user_agent' ; 
    server {
        listen       80;
        server_name  localhost;
        location / {
            access_log  /dev/shm/access.log ups;
            proxy_redirect off;
            proxy_pass http://BeaconWeb;
        proxy_buffer_size 64k;
        proxy_buffers   4 32k;
        proxy_busy_buffers_size 64k;
        proxy_temp_file_write_size 64k;
        proxy_set_header Host $remote_addr;
        proxy_set_header remote_addr $remote_addr;
        proxy_hide_header Host;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    location /ss
    {
    stub_status on;
    access_log off;
    allow 127.0.0.1;
    allow 10.0.0.0/8;
    deny all;
 
    }
    }
}


安装参数:
--prefix=/opt/dicc/nginx --with-pcre=/root/pcre-8.02 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --without-http_autoindex_module
<script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/buttonLite.js#style=-1&uuid=&pophcol=3&lang=zh"></script> <script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/bshareC0.js"></script>
阅读(249) | 评论(0) | 转发(0) |
0

上一篇:python 清空邮件

下一篇:VIM 代码编写设置

给主人留下些什么吧!~~
评论热议
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值