user root;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# 不能有下划线
upstream backend {
ip_hash;
server 49.4.71.119:5002;
#server 192.168.1.220:5002;
check interval=3000 rise=2 fall=5 timeout=1000 type=http;
check_keepalive_requests 100;
check_http_send "GET / HTTP/1.0
";
check_http_expect_alive http_2xx http_3xx;
}
server {
listen 80;
server_name localhost;
location / {
root /opt/app02/sys-webclient;
index index.html index.htm;
}
location ~*/(microarch|resource)/ {
proxy_pass http://backend;
}
location = /nginx_status {
stub_status on;
#allow 10.10.22.96;
#deny all;
}
location /status {
check_status;
access_log off;
#allow 10.10.22.96;
#deny all;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}