--prefix=/usr/local/nginx --sbin-path=/usr/local/nginx/bin/nginx --conf-path=/usr/local/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx/nginx.pid --user=nginx --group=nginx --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fcgi --with-http_stub_status_module --with-stream
stream {
upstream obdsocket {
hash $remote_addr consistent;
server 127.0.0.1:8081 weight=5 max_fails=3 fail_timeout=30s;
server 127.0.0.1:8082 weight=5 max_fails=3 fail_timeout=30s;
}
server {
listen 8080;
proxy_connect_timeout 120s;
proxy_timeout 1200s;
proxy_pass obdsocket;
}
}
本文详细介绍了Nginx的安装配置参数及其在负载均衡场景中的具体应用,包括如何设置upstream进行服务器集群的负载分发,以及具体的监听、超时等参数配置。
1万+

被折叠的 条评论
为什么被折叠?



