In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Experimental environment:
Before doing the experiment, we first prepare the experimental environment, first prepare an original clean operating system of Windows Server 2008 R2 on the virtual machine as the WEB server, and the ip address is set to 192.168.100.10.
Then the steps to install the web server:
1. First, add a role in the server manager, and select the Web server (IIS) role in the server role, as shown in the figure:
2.IIS7.5 is divided into more than 40 modules with different functions, and administrators can customize and install corresponding functional modules according to their needs, so that the security and performance of Web websites can be greatly improved. Therefore, the default setting is used in the step of selecting role service, and only the most basic modules are installed, as shown in the figure:
3. After the installation is complete, you can manage the IIS website through the "Internet Information Services (IIS) Manager" in the management tool. Open the IE browser and enter the ip address of the Web server in the address bar. When the following figure appears, it indicates that the installation is successful.
(in order to solve the problem that the website cannot be run at the same time)
After the Web server installation is complete, let's start our first experiment.
The purpose of the experiment is to realize the simultaneous operation of multiple websites on a network card by setting different port numbers for the website.
The steps of the experiment:
1. First, create two new folders on disk C (or somewhere else) named sdp and ytvc, and then put in the pre-written web pages, 1.html and 2.html, respectively.
two。 Click start-> Select Server Management tools-- > then open the Internet Information Services (IIS) Manager and configure the Web server at this interface
3. Set the default document for each of the two sites, and select the default document.
4. Then add the names of the pre-written web pages to the default document.
5. Create two new websites in this interface: sdp and ytvc point to the folders of these two sites respectively, and do not assign IP addresses to them. The other sites have different port numbers. Here, we set the port number of sdp to 8000 and the port number of ytvc to 80.
As shown in the figure, an example:
6. Modify the hosts file
Hosts files are shipped by default on all installed Windows systems, located in "% SystemRoot%system32\ drivers\ etc\ hosts". You can open the hosts file from notepad. Then add two records, 192.168.100.10 www.ytvc.com and 192.168.100.10 www.sdp.com.
As shown in the following figure:
7. Open the browser to visit ytvc first, enter www.ytvc.com in the address bar (because the default port number of http protocol is 80, so you do not need to add the port number when accessing), and find that you have successfully output the web page interface.
8. Then open the browser to access sdp, enter www.sdp.com:8000 in the address bar, and find that the access page is successful.
9. Finally, it is proved that the experiment is successful.
Next, let's do the second experiment:
Purpose: to realize the simultaneous operation of multiple websites on a network card by setting the same port number but different ip addresses to the website.
1. First, create two new folders on disk C (or somewhere else) named sdp and ytvc, and then put in the pre-written web pages, 1.html and 2.html, respectively.
two。 Click start-> Select Server Management tools-- > then open the Internet Information Services (IIS) Manager and configure the Web server at this interface
3. Add pre-added page names to the default documents for both sites.
4. In this interface, create two new websites, sdp and ytvc, which point to the folders of the two sites, and give them the same port number but different ip addresses.
(setting of website ytvc, IP address is 192.168.100.10)
(setting of website sdp, IP address is 192.168.100.20)
5. At this time, you need to add the ip addresses of these two websites to the network card.
6. Modify the hosts file
In "% SystemRoot%system32\ drivers\ etc\ hosts". You can open the hosts file from notepad. Then add two records of 192.168.100.10 www.ytvc.com and 192.168.100.20 www.sdp.com.
7. Open the browser and first visit ytvc, enter http://192.168.100.10 in the address bar, and find that you have successfully visited the web page interface.
8. Open a browser to access sdp, enter http://192.168.100.20 in the address bar, and find that the page has been accessed successfully.
9. The conclusion is correct and the experiment is successful.
Next, let's do our third experiment (mainframe head method).
Purpose: to use different hostnames to distinguish different websites
1. In this method, we need a DNS server to help complete the experiment. We first prepare an original clean virtual machine and install the DNS server, then set the address of the DNS server to 192.168.100.1. After installation, test the connectivity between the DNS server and the WEB server to ensure that they can ping each other.
two。 Click start at the bottom left-- > Select Server Management tools-- > then open DNS Manager and configure the DNS server in this interface.
3. Create two new major zones in the forward lookup zone
4. The first zone is named ytvc.com, and then until the creation is complete.
5. Right-click the newly created area, and create a new host with the www,IP address of the IP address of the WEB server, 192.168.100.10. Then click add Host configuration to complete.
6. To create a second primary area, www.sdp.com, as in the above steps, note that you are pointing to the same ip address when you create a new host.
7. Next, when we configure the WEB server, we first need to set the preferred DNS of the WEB server to the IP address of the DNS server.
8. First, create two new folders on disk C (or somewhere else) named sdp and ytvc, and then put in the pre-written web pages, 1.html and 2.html, respectively.
9. Click start at the bottom left-- > then select Server Management tools-- > then open the Internet Information Services (IIS) Manager and configure the Web server at this interface
10. Add pre-added page names to the default documents for both sites.
11. First, add the website ytvc. This time, the host header www should be set, and there is no need to assign an IP address.
twelve。 Add website sdp, also set host header www, do not need to assign IP address.
13. After building the website, you need to add the file name to the default document of the two websites.
14. Finally, prepare a client with the address 192.168.100.2. The first DNS is the ip address of the DNS server, and test the connectivity between the client and the DNS server and the WWEB server to ensure that they can ping each other. Then open the IE browser and type www.ytvc.com in the address bar to find that the page can be accessed successfully.
15. Then open the IE browser and type www.sdp.com, and find that you can also successfully access the page.
16. The experiment was successful
The problem encountered in the lab: when accessing an IE browser, the following prompt always appears.
Solution: open the server manager and select the server manager to find the configuration IE esc.
Then change enable to disable and it won't pop up.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.