Sunday, January 31, 2021

Default Web Site in IIS occupies interface IP

I have two website in Virtual Machine, one is in win server(`ws.example.com`) and the other is in debian('ls.example.com').

I was trying to do load balancing in nginx. I put two websites name in upstream block. The website in debian worked fine. However, the one in win server didn't. It always point to Default Web Site page(the website name in win server is same as the AD). So, I started do troubleshooting in IIS.

I have tried to change Default Web Site port(Figure1). However, when I entered "ws.example.com" in browser, it showed "HTTP 404 Not Found". Next I tried to give Default Web Site an IP address and Host Name(Figure2), `ws.example.com` worked fine but not for `interal.example.com`(from Default Web Site), and enter `192.168.1.10` in browser wouldn't direct to `ws.example.com`. It would lead to "HTTP 404 Not Found ". I also tried change Default Web Site port back to 80, but the result still be the same. Therefore, I ask for help.

My goal was Default Web Site and WS work fine and the enter IP `192.168.1.10` can browse `ws.example.com` since I want to do load balance.

Setting Before Troubleshooting

Sites Type Host Name Port IP Address
Default Web Site http 80 *
WS http ws.example.com 80 192.168.1.10

Figure1

Sites Type Host Name Port IP Address
Default Web Site http 8000 *
WS http ws.example.com 80 192.168.1.10

Figure2

Sites Type Host Name Port IP Address
Default Web Site http internal.example.com 8000 127.0.0.1
WS http ws.example.com 80 192.168.1.10



No comments:

Post a Comment