Thanks for your reply.
I am using just one worker. Here's my conf:
#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;
}
http {
access_log off;
#limit_req_zone $binary_remote_addr zone=one:10m rate=1r/m;
include mime.types;
default_type application/octet-stream;
#proxy_cache_path /nginx-cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m;
#proxy_temp_path /nginx-cache/tmp;
#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 10s;
#gzip on;
upstream lb_units {
server localhost:8081 weight=10 max_fails=3 fail_timeout=1s; # Reverse proxy to BES1
server localhost:8082 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES2
server localhost:8083 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES3
}
upstream lb_units1 {
server localhost:8081 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES1
server localhost:8082 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES2
server localhost:8083 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES3
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location /k {
proxy_pass http://lb_units;
#limit_req zone=one burst=5;
#proxy_cache my-cache;
#proxy_cache_valid 200 302 60m;
#proxy_cache_valid 404 1m;
}
location /p {
proxy_pass http://lb_units1;
}
location /bar {
keepalive_timeout 2s;
expires 20m;
root html;
index index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
I am using just one worker. Here's my conf:
#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;
}
http {
access_log off;
#limit_req_zone $binary_remote_addr zone=one:10m rate=1r/m;
include mime.types;
default_type application/octet-stream;
#proxy_cache_path /nginx-cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m;
#proxy_temp_path /nginx-cache/tmp;
#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 10s;
#gzip on;
upstream lb_units {
server localhost:8081 weight=10 max_fails=3 fail_timeout=1s; # Reverse proxy to BES1
server localhost:8082 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES2
server localhost:8083 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES3
}
upstream lb_units1 {
server localhost:8081 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES1
server localhost:8082 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES2
server localhost:8083 weight=10 max_fails=3 fail_timeout=30s; # Reverse proxy to BES3
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location /k {
proxy_pass http://lb_units;
#limit_req zone=one burst=5;
#proxy_cache my-cache;
#proxy_cache_valid 200 302 60m;
#proxy_cache_valid 404 1m;
}
location /p {
proxy_pass http://lb_units1;
}
location /bar {
keepalive_timeout 2s;
expires 20m;
root html;
index index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}