server2016 Web server & three virtual host Labs

Source: Internet
Author: User

Virtual Host: Multiple Web sites running on the same server
Implementation: Based on the IP address, based on the port number (default 80, modify any of the above 1024); host-based name (HOST,DNS)
The host method needs to be modified on the c/windows/system32/drivers/etc.
Experimental content: Build a Web server in server2016, and then create 2 pages, respectively, mainly for the city and happy home. The Web site is then run through three ways, such as IP address, port number, and host name.

First build the Web server on the server2016, in the Server Manager -- add roles and features --then check the Web server (IIS)in the server role , and then start the installation.

Click Start -Windows Tools Management -Internet information Services (IIS)

Add a site and rename it. Next go to the physical path of each website, modify the content of each website (physical path can be viewed by clicking the site right-click, Manage website -- Advanced Settings )

After we run the website through the IP address, first set the virtual machine two network card IP address and host communication, and then bind the site in IIS Manager (right click Site Edit binding )
Then we can enter the URL on the host to test.

Test results, the site can operate normally.

The second type, based on the port number. This method and the first one only need an IP address, in the edit binding with a unified IP address, the port number changes can be different.

Test results on the host.

The site will run as usual.

The third type, based on the host name. Requires two URL IP, the same port number, the machine name is not the same.


Then on the host c/windows/system32/drivers/etc,hosts file inside the last add IP address and host name, to drag out to modify.

Final Test results


The site can run as usual and the experiment succeeds.

Note: Sometimes the first kinds of errors, mainly focus on the physical path to put the default text, some URLs on the host can not be tested or the reason for the firewall, so try to turn off the firewall test.

server2016 Web server & three virtual host Labs

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.