worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream backendserver { # 原来这里命名的时候使用的是backend_server ,有个下划线,把下划线去掉就好了
server xx.yy.zz.83:8080 weight=1 max_fails=2 fail_timeout=30s;
}
server {
listen 80;
server_name www.abc.com;
location / {
# root html;
# index index.html index.htm;
proxy_pass http://backendserver;
}
location ^~ /uploads/ {
root html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}