iis connotes problems binding secondary domain names

  • 2020-05-06 12:00:22
  • OfStack

It is basically some concepts, but after seeing these things, I have a basic understanding of the meaning of pan-parsing and pan-binding. Finally, I have configured it successfully. Here's the problem:

Host header is bound to the domain name, no domain name does not need to set the host header.

The name of the so-called host header is derived from the function of domain name binding in IIS. A typical web server can only correctly correspond to a website with port 80 of an ip address and handle the access request of a domain name. While the web server does not use multiple ip addresses and ports, if you need to support multiple relatively independent websites, you need a mechanism to distinguish requests from different websites on the same ip address, which leads to the method of host header binding. Simply put, the different website Spaces correspond to different domain names, in order to connect the domain name fields in the request to distribute and reply to the correct corresponding file execution results.

For example, a server with an ip address of 192.168.1.10 has two domain names and corresponding Spaces on this server, using port 80 of 192.168.1.10 to provide services. If you simply resolve the domain name records of two domains, A and B, to this ip address, then the web server will respond to any request with the same website information, which is obviously not up to scratch. Next we use the host header to bind the domain names A and B to their corresponding spatial folders C and D. When the web request information containing the domain name A reaches 192.168.1.10, the web server will execute the home page file in the corresponding space C and return it to the client. Therefore, after using the host header binding function, you cannot use the ip address to access any website on it, because the domain name information does not exist in the request information, so there will be an error.

Open IIS manager, site management, the original site regardless of the default site, right-click, properties, set the default site properties.

Click advanced, set the default value, IP all unassigned (default value, not moved), port 80(generally 80), host header value is empty. Sure,

Then set the home directory as the company folder, such as: E:\wwwroot\company, (the home directory of the DESTOON system is E:\wwwroot\), as shown in figure:

Assuming nothing unexpected, the pan-domain binding has been successful.

Summary: when there is a problem in the work, you may not find the right solution on the Internet, but it will give you some clues. Failure is fucking success, so you have no reason to hate him.

author: : package are   (www. goldball. cn), the original link:   http: / / www goldball. cn/blog jishu / 176. html

All rights reserved. When reprinted, the author and original source must be indicated in the form of a link and this statement


Related articles: