nginx.conf
worker_processes auto; // 自动模式,cpu的核数
worker_connections 12500; //一个worker理数,真正处理数量等于worker_processes* worker_connections
--with-http
nginx-status
location /nginx_status {
stub_status on;
access_log off;
auth_basic "welcome"
allow 192.168.88.1;
deny 192.168.88.0/24;
}
access_log log/log-access.log main;
异步非堵塞
反向代理
location / {
proxy_pass http://xxxx;
}
nginx 负载均衡
使用默认rr轮询算法
upstream bbs {
server 192.168.0.1;
server 192.168.0.2
}
nginx
-with-http_ssl_module模块 实现https