发现, 在配置文件中, 删除 admin 和 wordpress 的配置 都能访问成功,
重启 nginx, 服务器都不能解决此问题
问题重现
把 lb01 关机, lb02 上修改 为如下:
[root@lb02 /etc/nginx/conf.d]#cat lb_proxy.conf
upstream blog {
server 172.16.1.7:80;
server 172.16.1.8:80;
}
server {
listen 80;
server_name zh.baimei.com;
location / {
proxy_pass http://blog;
include proxy_params;
}
}
重启后 可以正常访问 admin.baimei.com
lb_proxy.conf 源文件
:
[root@lb02 ~]#cat /etc/nginx/conf.d/lb_proxy.conf
upstream blog {
server 172.16.1.7:80;
server 172.16.1.8:80;
}
server {
listen 80;
server_name wordpress.baimei.com;
location / {
proxy_pass http://blog;
include proxy_params;
}
}
server {
listen 80;
server_name admin.baimei.com;
location / {
proxy_pass http://blog;
include proxy_params;
}
}
server {
listen 80;
server_name zh.baimei.com;
location / {
proxy_pass http://blog;
include proxy_params;
}
}
欢迎来撩 : 汇总all