-
Notifications
You must be signed in to change notification settings - Fork 9
How to create Nginx Upstream Load Balancer
Taymindis Woon edited this page Sep 27, 2017
·
1 revision
http {
...
..
upstream fastcgi_backend {
server 127.0.0.1:2005;
server 127.0.0.1:2006;
server 127.0.0.1:2007;
# keepalive 8;
}
server {
...
location /searchMyStuff{
add_header Allow "GET, POST, HEAD" always;
if ( $request_method !~ ^(GET|HEAD)$ ) {
return 405;
}
include /etc/nginx/fastcgi_params;
fastcgi_param FN_HANDLER search_my_stuff;
fastcgi_pass fastcgi_backend;
# fastcgi_keep_conn on;
}
}
Ref: http://nginx.org/en/docs/http/ngx_http_upstream_module.html