之前捣鼓的,一直没有记录下来,其实很简单,网上感觉挺多都不好使,附上自己配置,记录下!!!
upstream tomcat_xxx{
server 111.22.33.555:8980;//可以配置多个,做负载均衡,也可以配置权重weight=5;
}
server {
listen 80;
server_name xxxx.xxxx.com;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://tomcat_xxx;
proxy_read_timeout 600s;
index index.html index.htm;
}
}