nginx.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 {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
upstream tomcatserver1 {
server localhost:8080 weight=1;
server localhost:8081 weight=1;
server localhost:8082 weight=1;
server localhost:8083 weight=1;
server localhost:8084 weight=1;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://tomcatserver1;
root html;
index index.html index.htm;
}
}
}