nginx.conf 配置内容:
#-------------------------------------------------
#需要两个tomcat 能同时运行,配置不同的端口。
#-----------------------------------------------------
worker_processes 2;
error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
#gzip on;
upstream myenginx {
server localhost:8080;
server localhost:8083;
}
server {
listen 80;
server_name localhost;
charset UTF-8;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
proxy_pass http://myenginx; #请求转向mysvr 定义的服务器列表
}
}
}