老师,您好,在学习Tomcat集群时,出现了如下问题:
Nginx可以访问到“welcome to Nginx”页面
Tomcat1 可以使用www.chencong.com:9080访问
Tomcat2 可以使用www.chencong.com:10080访问
但是负载均衡时,访问www.chencong.com一直是welcome页面,无法跳转到具体的Tomcat页面
nginx.conf已添加include
vhost文件夹添加了www.chencong.com.conf
upstream www.chencong.com{ server 127.0.0.1:9080; server 127.0.0.1:10080; #server www.chencong.com:9080; #server www.chencong.com:10080; } server{ listen 80; autoindex on; server_name chemcong.com www.chenong.com; access_log d:/access.log combined; index index.html index.htm index.jsp index.php; # error_page 404 /404.html location / { proxy_pass http://www.chencong.com/; } }
这是刚刚的日志
2018/03/01 22:48:44 [alert] 7056#13116: *4094 1024 worker_connections are not enough while connecting to upstream, client: 127.0.0.1, server: www.chencong.com, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:80/", host: "www.chencong.com"