user nobody nobody;
worker_processes 4;
pid logs/nginx.pid;
error_log logs/error.log error;
events {
use epoll;
worker_connections 1024;
}
http {
include mime.types;
include proxy.conf;
sendfile on;
tcp_nopush on;
tcp_nodelay off;
keepalive_timeout 0;
default_type application/octet-stream;
upstream backend {
server 192.168.1.188:8080 srun_id=c1 weight=1;
jvm_route $cookie_JSESSIONID reverse;
}
server {
listen 80;
server_name foo.com;
index index.html index.htm;
access_log logs/access.log;
location / {
proxy_pass http://backend;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 50M;
client_body_buffer_size 256k;
proxy_connect_timeout 600;
proxy_send_timeout 300;
proxy_read_timeout 300;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
location /status {
stub_status on;
access_log off;
allow all;
deny all;
}
}
}