The.net site established with IIS cannot access the solution through the IP address

  • 2020-05-10 23:11:51
  • OfStack

iis is used to build a website of.net. Port 80 of ip and port 80 of 127.0.0.1 of iis are used to bind the server public network ip in iis. As a result, the ip address cannot be directly accessed.

Since the site is not yet registered, the ip address is used to test the site.

For the website created with pache, modify the httpd.conf file, bind ip:80 can be accessed from ip

What the hell is going on? I found out later that iis also has something called the host header, which is mainly used to set up the virtual host. Used with 1ip under multiple sites.

Now by modifying

hosts file to visit the site, problem solved.

Add 1 line to the hosts file

123.43.25.67 www.host.com

#ip hostname

Then you can visit the website through the website address

Related articles: