Building a Web server
There are three ways to build a Web server:
1, based on IP address
2, based on the port number (the default 80 port, can be modified)
3, based on host name (DNS, hosts)
First determine the installation of the Web service, if it is not installed, follow the instructions below
This experiment is based on Windows Server 2016
Open Select Server Manager, select the server role Web server , select Next and complete the installation.
Wait a moment after the installation is complete, open Internet informationservices (IIS) Manager
After opening, right-click on the site to add the site you want to add more than a few
It is important to note that only the following format files are recognized by default or manually added
Fill in the desired site name and content directory
There are 3 ways to implement this method based on IP address first.
IP addresses allow different Web sites to have different IP addresses, but the corresponding NICs need to be assigned their own IP
For example, my network card allocation is 192.168.5.55 second network card allocation 192.168.5.11 corresponding to a site and b site
Modify the name and physical path and IP address of site A and site B as shown.
Confirm and start the site after the modification is complete
Next look at the effect
A website
B website
2-based on port number implementation
In some cases, multiple IPs cannot be assigned, so multiple sites can be run on the same server based on the port number
The same method adds two sites, but adds different port numbers when you select the same IP address
If the a site port number is the default B site is 8080
A site effect
b site Effects
3-based on host name
There are two ways of hosting DNS and modifying hosts based on host name
Because the experimental environment does not have DNS can only be modified by the hosts this way to implement
Modify the hosts under this machine and add the IP address and hostname corresponding to site A and b
Use ping to detect if it is reachable, if the return data resolves to the IP address description is possible.
server2016 Web server & three virtual host Labs