An IP built a number of Web sites

xiaoxiao2021-03-06  58

Method 1, TCP port method

For various reasons, we sometimes need multiple Web sites on an IP address. In IIS5, we may reach this target through simple settings.

In IIS, each Web site has unique, identified by three parts, used to receive and respond requests:

(1) IP address

(2) port number

(3) Host name.

In IIS, a plurality of separate Web sites are established on an IP address, and there is usually two methods, this article describes TCP port law in an example.

Environment: Suppose the internal network of the Japanese company (huh, ...) consists of a Win2000 server and dozens of workstations, the network segment of this internal network is 192.168.1.0/24, the address of the server is 192.168.1.10, the name is MyServer The Internet service is installed in this server.

There are three departments of A, B, and C, at 8086, 8087, 8088. Now the company requires network administrators to use an IP to build a website for the company and three departments on the server, which is to establish Four websites.

By using an additional port number, the site requires only one IP address to maintain multiple sites. When the customer wants to access the site, you need to attach the port number after the static IP address (except for the default Web site, it uses port 80).

The specific operation is as follows:

1. Create a folder on the hard disk on the Win2000 server, as a home directory for the Web site. As follows: Web site main catalog Web site

D: / Web / COM website

D: / web / a a department website

D: / Web / B B department website

D: / Web / C C Site website

2. Use the Web Site Management Wizard to establish four Web sites for the company and three departments, and the biggest difference is the use of different TCP ports:

Company site A department site B department site C department site

IP address 192.168.1.10

TCP port 80 8086 8087 8088

Permission read and run the script

Site main directory D: / web / com d: / web / a d: / web / b d: / web / c

In this way, the client can pass:

Http://192.168.1.10 Access the company site.

Http://192.168.1.10:8086 Access a department site

Http://192.168.1.10:8087 Access B department site

Http://192.168.1.10:8088 Access to C Department Site

This method established a Web site uses a non-default port website with relatively concealment, but this method maintains multiple sites to require customers to type the actual digital IP address before the port number. You cannot use host names and "friendly names".

Method 2, host name

For various reasons, we sometimes need multiple Web sites on an IP address. In IIS5, we may reach this target through simple settings.

In IIS, each Web site has unique, identified by three parts, used to receive and respond requests:

(1) IP address

(2) port number

(3) Host name.

In IIS, a plurality of separate Web sites are established on an IP address, and there are usually two methods. This article describes the host header in an example, using this method to establish a professional virtual host.

Environment: Assuming that the Chao Group (呵 ...) provides a virtual host service with a Win2000 server, the address is 192.168.1.10. The Internet service is installed in this server.

Now the company requires network administrators to build an independent website for four companies for ABCD on the server. Each website has its own independent domain name. The four website domain names are: www.a.com, www.b.com, Www.c.com and www.d.com.

By using the host head, the site can maintain multiple sites only one IP address. Customers can use different domains to access their respective sites, at all, do not feel that these sites are on the same host.

The specific operation is as follows:

1. Create a folder for the Win2000 servers to do a folder as a web site. As follows: Web site main 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 the Web Site Management Wizard to establish an independent Web site, and the biggest difference is the name of different hosts:

A company site B company site C company site D company site IP address 192.168.1.10

TCP port 80

Permission read and run the script

Host head name

Www.a.com www.b.com

Www.c.com www.d.com

Site main directory D: / web / a d: / web / b d: / web / c d: / web / d

In the DNS, these four domain names are registered, and they all points to one address: 192.168.1.10. In this way, the client can pass:

Http://www.a.com Access a company site.

Http://www.b.com Access the B company site.

Http://www.c.com Access the C company site.

Http://www.d.com Access D Company Site.

3. Host names of each site can set up in the WEB site to set up, it is on the IP address of the site, the TCP port is on the same screen. It is also possible to pass the site -> Properties -> "Web Site" tab - > Select the "Advanced" button on the right of the IP address to jump out of the "Advanced Multi-Web Site Configuration".

This method establishes a professional virtual host, almost all companies that use IIS to provide virtual hosts.

转载请注明原文地址:https://www.9cbs.com/read-85066.html

New Post(0)