The same IP is used to set up multiple websites in the IIS environment.

  

TCP Port Method For various reasons, we sometimes need to create multiple web sites on one IP address. In IIS5, we may achieve this through simple settings. This goal. In IIS, each Web site has a unique, three-part identity that is used to receive and respond to requests: (1) IP address (2) Port number (3) Host header name In IIS, in a There are usually two ways to create multiple independent web sites on an IP address. This article introduces the TCP port method in the form of an example.

Environment: Assume that the internal network of the shortcoming studio consists of a win2000 server and dozens of workstations. The network segment of this intranet is 192.168.1.0/24, and the address of the server is 192.168.1.10. The name is Myserver. The Internet service, IIS 5, is already installed on this server. Disadvantages Studio has three departments, A, B, and C, which are located in three rooms of 8086, 8087, and 8088. Now the studio asks the network administrator to use the IP on the server to create a website for the studio and the three departments, that is, to build four websites. By using an additional port number, a site can maintain multiple sites with just one IP address. When a customer wants to access a site, the port number is appended to the static IP address (except for the default Web site, which uses port 80). The specific operations are as follows: 1. Create a folder on the hard disk for the studio and three departments on the win2000 server, as the WEB site home directory. The following is the WEB site home directory WEB site d:\\web\\com Studio website d :\\web\\a A department website d:\\web\\b B department website d:\\web\\c C department website 2. Use WEB site management The wizard establishes four WEB sites for the studio and three departments. The biggest difference between the four is the use of different TCP ports: Studio Site A Department Site B Department Site C Department Site IP Address 192.168.1.10 TCP Port 80 8086 8087 8088 Permission to read and run scripts The site home directory d:\\web\\com d:\\web\\ad:\\web\\bd:\\web\\c This way, the client can access the work via: http://192.168.1.10 Room site. Http://192.168.1.10:8086 Visit the A department site http://192.168.1.10:8087 Visit the B department site http://192.168.1.10:8088 Visit the C department site This method establishes a WEB site using a non-default port The site is relatively invisible, but this method of maintaining multiple sites requires the customer to type the actual numeric IP address before the port number. Cannot use hostname and “friendly name”.

Method 2, host header method The host header method is described below. This method can be used to establish a professional virtual host. Environment: Assume that the defect studio provides a virtual host service with a win2000 server, the address is 192.168.1.10. An Internet service, IIS 5, has been installed on this server. The studio now requires network administrators to use an IP on the server to create separate websites for the four ABCD companies, each with its own separate domain name. The four website domains are: www.a.com, www.b.com, www.c.com and www.d.com. By using a host header, a site can maintain multiple sites with a single IP address. Customers can access their sites using different domain names, and they are not aware of these sites on the same host. The specific operations are as follows: 1. Create a folder for the four companies in the win2000 server as the main directory of the WEB site. The following is the WEB site home directory WEB site d:\\web\\a A company website d:\\web\\b B company website d:\\web\\c C company website d:\\web\\d D company website 2. Use WEB site management Wizards, each of the four companies to establish an independent WEB site, the biggest difference between the four is the use of different host header names: A company site B company site C company site D company site IP address 192.168.1.10 TCP port 80 permissions read and Run the script host header www.a.com www.b.com www.c.com www.d.com site home directory d:\\web\\ad:\\web\\bd:\\web\\cd:\\web\\d The four domain names are registered in the DNS and all point to the same address: 192.168.1.10. In this way, the client can access the company A site at: http://www.a.com. Http://www.b.com Visit the B company site. Http://www.c.com Visit the C company site. Http://www.d.com Visit the D company site. 3. The host header name of each site can be set in the WEB site setup wizard, which is on the same screen as the IP address of the site and the TCP port. It is also possible to configure through the site->”property”->”WEB site”tag->select the right ”advanced” button to the right of the IP address">> advanced multi-web site configuration” . This approach builds a professional virtual host, and almost all companies that use IIS to provide virtual hosting do so. But nowadays, everyone will not manually divide this, but use some professional virtual host management system to manage. Such a management system is no longer limited to managing the local server, but can be managed by a master server. Any number of other servers on the network.

Copyright © Windows knowledge All Rights Reserved