老师,负载均衡转发有问题
来源:6-13 单点登录Redis存储Session及SessionId问题说明与集群实战-3

慕先生2101995
2019-07-24
这是nginx中的vhost的配置,在nginx.conf中也引入了include:vhost/*.conf;
upstream www.happymmall.com{
#server www.happymmall.com:8080 weight=1;
# server www.happymmall.com:9080 weight=1;
server 127.0.0.1:8080 weight=1;
server 127.0.0.1:9080 weight=1;
}
server {
listen 80;
autoindex on;
server_name happymmall.com www.happymmall.com;
access_log c:/access.log combined;
index index.html index.htm index.jsp index.php;
location / {
proxy_pass http:// www.happymmall.com;
add_header Access-Control-Allow-Origin *;
}
}
两个mmall项目也启动成功,nginx也启动成功,输入www.happymmall.com页面报错,并不能跳到8080或者9080
写回答
2回答
-
慕先生2101995
提问者
2019-07-25
老师,已解决,是nginx的版本问题
00 -
geelylucky
2019-07-24
同学,你的配置这里有空格:
012019-07-25
相似问题
Nginx负载均衡配置失效
回答 4
nginx负载均衡
回答 1