server2016 Web server & three virtual host Lab documentation

Source: Internet
Author: User
Tags website ip

server2016 Web server & three virtual host Lab documentation Experiment One

first, the experimental task
? website home Directory--Path: C/inetpub/wwwroot
? Default Document Format: View default document, most commonly used index.html
Change document to open suffix display
To add the Tang poetry website to its own website to run
second, the experimental steps
1. Build a Web server
To start sever2016 from a virtual machine, open Server Manager

Select Server

Add Server role (select Web Server (IIS))

Add the appropriate features (this experiment chooses the default)

Open Windows Administration Tools after successful installation

The Internet Information Services (IIS) instructions that appear with the arrow points to the service have been built

2. Build Web site
Open a server that is already set up (the arrow points to the default Web site)

Set the server2016 corresponding virtual network card, set the virtual network card VMNET1 and server2016 server network card IP address
Configure the Virtual network card (this experiment is to choose VMnet1, virtual network card and server network card in the same network segment, this experiment is 192.168.80.0/24)
Configure the Virtual network card

Configuring the Server2016 server Nic

View site Home directory path



Note: The physical path is the home directory path of the site,%systemdrive% is a disk variable, this experiment corresponds to the server's C disk.
View the format of the default document and default document, most commonly index.html


Change the document suffix name
Go to the root directory, delete the contents of the default Web site, create a new text document, and open the hidden extension of the file

Note: First in the TXT file to write the content of the site to write, and finally set the name of the site to index.html format.
Add Tang poetry website to your own website to run
Right-click Add Web Site


Note: Website name customization, the most critical is the physical path of the site and the binding IP address must exist and consistent in the server.
3, PC real-computer verification
Ping Server IP Address 192.168.80.33

Open the browser in the real machine enter the IP address of the Web site binding (that is, the IP address of the server network card)

Experiment Two

First, the experimental task
? virtual directory: share a folder with a Web page
How to access: Http://192.168.80.33/music
Note the content format to be recognized
Second, the experimental steps
To the Tang poetry website right-click Add virtual directory

Alias customization, the music file in the physical path is created in advance.

Verify that the virtual file pressure is added successfully

Create a new HTML-formatted index file for testing in a folder

Verify from the browser in the real machine (add/music after the original Tang Dynasty website IP)

Experiment Three

First, the experimental task
Virtual Host: Multiple Web sites running on the same server
Implementation method:
Based on IP address;
Based on port number; default 80, modify any of 1024 or more; 8080
Based on host name; (DNS) (hosts)
Second, the experimental steps
1, based on IP address
Based on the IP address, is a Web site corresponding to an IP address, an IP address for a network card, so to achieve the same server to run multiple sites, you must add another network card (this experiment is VMnet2)
Add a virtual network card to the virtual machine VMnet2

Set the IP address of the same network segment in the real machine PC and server respectively (the IP address of the 192.168.90.0/24 network segment is used in this experiment)
Configuring a virtual network card in a PC

Configuring the Virtual network card in server2016

Add a Web site (the bound IP address should be 192.168.90.33)

See if the site was added successfully

Verify that the same server runs multiple Web sites (only two sites have been added to this lab)
Website one:

Website two:

2, based on the port number (this experiment uses the same ip:192.168.80.33, the ports are 80 and 8080 respectively)
Add a website (change port number to 8080)


Note: The Web site and the Tang poetry website are all belong to the same IP address different port number, Tang poetry network is the default 80 port, Happy station is 8080 port
Validating from a PC real-Computer Browser


Note: The port number colon must be a colon in the English state; the server2016 firewall in the real machine and the virtual machine must be shut down
3, based on the host name (this experiment is the Tang poetry Network and Urban Dynamic Network)

Select the corresponding IP address to edit

Add host Name


To change the host file manually add DNS (path: C:\WINDOWS\SYSTEM32\DRIVERS\ETC)

Note: #代表注释
Changing the host file is a system file, the file should be moved to the desktop as text changes and then moved back in place, otherwise there will be no permission changes.

Verify from PC Real machine

server2016 Web server & three virtual host Lab documentation

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.