WEB server settings can be opened simultaneously two sites, ports and IP addresses French law

Web server configuration to a static IP address

Here Insert Picture Description

WEB server installation

1. Open the Service Manager, click on the "role", click "Add Role"
Here Insert Picture Description
2. Click "Next"
Here Insert Picture Description
3, check the "WEB Server (IIS)", click "Next"
Here Insert Picture Description
4. Click "Next"
Here Insert Picture Description
5, click "Next" (if the page is a dynamic page, and then check the "application development", but not very safe)
Here Insert Picture Description
6. click "install"
Here Insert Picture Description
7, click "Close"
Here Insert Picture Description

Create a site content

Open the "Computer" - "Local Disk C" - "inetpub File" - Create a new folder "wangzhan1" and "wangzhan2" - in two separate folders inside right-click the new "Text Document" - Open Text document, in which the input content - save as .html file

Port method (for the use of relatively few people, a small area, the public network can be a private network)

1. Click "Start" - "Administrative Tools" - open "Internet Information Services (IIS) Manager"
Here Insert Picture Description
2, right-click the "Site" - Click on "add a site"
Here Insert Picture Description
3, enter "site name", select "Apply pool program ", select" physical path, click "OK." (If the port is still here is 80, set the default Web site (default Web site) stops running)
Here Insert Picture Description

4, add a second site in the same way, to note that: The port can not be here and a port on the same
Here Insert Picture Description
5, stand-alone "wangzhan1", double-click the "Default Document", right click on the "Add"
Here Insert Picture Description
6, entered just created for wangzhan1 html file name, and click OK
Here Insert Picture Description
7, in the same way for wangzhan2 html file name added on
Here Insert Picture Description
8, open the "computer" in the search field, enter "hosts" search the hosts file, use Notepad to open the first two hosts file
Here Insert Picture Description
9, add two domain names (Note: the same IP address), save
Here Insert Picture Description
10, visited two sites in the browser with the domain name, plus a port, without a port (provided that this port is port 80)
Here Insert Picture Description

IP address method (best not to use the public Internet because the cost is too high for the private network)

1, on a card to add more IP, click on the "Advanced",
Here Insert Picture Description
2. Click "Add", where they add a new address of a 192.168.18.2
Here Insert Picture Description
3, click the "wangzhan1" the right of the "binding" pop-up " network bindings "window, select the message, click the" edit "
Here Insert Picture Description
4, select the IP address 192.168.18.1, port 80, click" OK "
Here Insert Picture Description
5, in the same way" wangzhan2 "a" network binding "setting, attention: port number should be changed to 80, click "OK"
Here Insert Picture Description
6, open the hosts file, a different IP address corresponding to a different domain name, click save
Here Insert Picture Description
7, visit the Web site domain name in the browser with
Here Insert Picture Description

note:

1、端口号可以跟在IP地址后面,也可以跟在域名后面
2、HOSTS文件解析时不可带端口号

Guess you like

Origin blog.csdn.net/weixin_42569404/article/details/91421396