[Requirement]
In actual work, each person may be responsible for the maintenance of several websites. In this case, in order to keep the local test and server configuration the same, the ports of each website are all 80 (default ),
However, a website can only have one port, so it is possible to configure a different port for each website. During the test, enter the URL + port in the address bar, the test is inconvenient. here I will introduce a method to make the port of each website the same as port 80, so that we can perform a local test.
Process]
① Configure IIS and select D: \ ax as the path
② Create two solutions under. Net: ax | webapplication1
③ Add two websites to IIS In the path D: \ ax | D: \ ax \ webapplication1
④ Select "advanced" at the IP address. In the displayed "advanced website ID" dialog box,
Edit Host header values: www.ax.com | www.test.com
The configuration result is changed as soon as it is reduced. You can download this image to your local device ):
[Append] Sorry, I did not make it clear:
The path in ① is the path of the ax website. Do not use the master node, and then create two other websites. The path must be the directory at the next level of D: \ ax.
⑤ Edit the file in this path (System Disk path) c: \ windows \ system32 \ drivers \ etc \ hosts
:
6. You can enter www.ax.com or www.test.com in IE to view the two local solutions. hoho ~~~