How to bind a second-level domain name in iis

Source: Internet
Author: User

There are some basic concepts, but after reading these things, I basically understood the meaning of wildcard parsing and wildcard binding, and finally successfully configured it for me. Let's talk about this question one by one:

The Host header is a bound domain name, and you do not need to set a Host Header if there is no domain name.

The so-called host header is called from the function of binding domain names in IIS. Generally, port 80 of an IP address on a web server can only correspond to one website correctly and process access requests for one 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. This shows the Host Header binding method. Simply put, different website spaces correspond to different domain names, and the domain name fields in the connection request are used to distribute and respond to the correct file execution results of the corresponding space.

For example, if the IP address of a server is 192.168.1.10, there are two domain names and the corresponding space on this server, and port 80 of 192.168.1.10 is used to provide services. If you simply resolve the Domain Name Records of two domain names A and B to this IP address, the web server will report the same website information when receiving any request, this clearly fails to meet the requirements. Next, we use the Host header to bind domain names A and B to their corresponding space folders C and D. When the web request information containing domain name A reaches 192.168.1.10, the web server executes the homepage file in Space C corresponding to it and returns it to the client. The same is true for the web request information containing domain name B, it only explains the space D file. Therefore, after using the Host Header binding function, you cannot use an IP address to access any website on it. Because the request information does not contain domain name information, an error occurs.

Open the IIS manager and manage the website. If the original website does not matter, right-click the default website and set properties for the default website.

Click Advanced. Set the default value. All IP addresses are not allocated (default value, do not move). Port 80 (generally 80). The host header value is blank. OK,

Set the home directory to the company folder, for example, E: \ wwwroot \ company. (the main directory of the DESTOON system is E: \ wwwroot \),

If no problem occurs, the wildcard domain name is successfully bound.

Work Summary: when a problem occurs at work, you may not be able to find the correct solution on the Internet, but it will give you some clues. You still have to study and try more on your own, try multiple times if you cannot do it at a time. Failure is a success, so you have no reason to hate him.

Author ::Pack Yizheng (Www.goldball.cn), original article link:Http://www.goldball.cn/blog/jishu/176.html

Copyright. The author and original source and this statement must be indicated in the form of links during reprinting.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.