Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set up multiple websites at the same time on IIS server

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to set up multiple websites on the IIS server at the same time, I believe most people do not know much about it, so share this article for your reference. I hope you will learn a lot after reading this article. Let's learn about it together.

Preparatory work

First of all, we need to make sure that IIS and web services are installed on our server, which will be used later.

Create different website directories and folders

I use the familiar search engine here as an example. If these three companies see it, don't bother me. I'm just here for learning. I don't mean to slander your company.

Among them, I created a new index.htm file under each of my own search engines and made comments on Baidu, Google and Bing respectively. It is convenient for us to check the test.

Configure the IIS server

Next we are going to start to configure IIS, first of all, let's make this problem a little easier, the title is the same IP, different ports visit different websites. This should not be a big problem for the average programmer.

But I'd better write down the steps so that beginners can get started quickly.

Same IP with different port configuration

Double-click our iis server, find the folder of the website on the left side of Internet Information Services (IIS) Manager, then click right-click, New-> website, next step in the pop-up website creation wizard, enter Baidu in the site description, next, the IP address of the website, select the IP address of the network card, here is 192.168.1.1, port default is 80, next step Path selection We just built Baidu under the folder, the next step, first check read, run the script these two first, next, you can see the completion of the website wizard.

Let's first test our newly built "Baidu" website.

Succeed!

Then we are similar to the above method, except for changing the port number, everything else is the same. I set Baidu to 80 (domestic support), Bing to port 82, and Google to port 81.

It's one step closer to our answer. Haha.

Then we magnify the problem a little bit, that is, different IP visit different websites on the same port.

Same port configuration for different IP

First of all, we need to configure different IP addresses on the network card. We have added 192.168.1.1 at the beginning, so let's assign this IP (192.168.1.1) to Baidu, then we will assign a new 192.168.1.100 to Google and a new 192.168.1.200 to Bing. Look at the operation, Network neighbor-> right-click-> Properties-> Local connection-> right-click-> Properties, find the Internet protocol (TCP/IP) in the general options, double-click, select Advanced in the Internet Protocol (TCP/IP) properties, and in the advanced TCP/IP settings, add 192.168.1.100 and 192.168.1.200 to the IP address, and then determine it all the way. IP is set up, and then we need to modify the IP and port of the website.

I think many friends do not need to see here, should also be able to match. But friends who won't can continue to look down.

Double-click our IIS information service again, we need to explain here, our original "Baidu" website is 192.168.1.1 port is 80, then it does not need to be modified, so we just need to modify Google and Bing in the website, or look at the operation.

Find Google's website, right-click the properties, and modify the IP address and port number directly in the pop-up window. And make sure. The same goes for Bing.

Next, let's test our configuration again.

Same IP, same port shows different websites.

After going around so much, let's go back to this topic: the same IP, the same port configuration and different websites need to cooperate with the host headers in the DNS and IIS sites. Let's look at the operation. First of all, let's make sure that the DNS server is installed. At the beginning-> Administrative tools-> DNS, open it.

After opening DNS

In DNS- > WINDOWS2003- > forward search zone, right-click to create a new zone, pop up the New Zone Wizard dialog box, next, default next, region name, enter the URL, such as Baidu is baidu.com, next, default next, do not allow dynamic updates, the next step, complete the wizard. At this time, we found that there is a baidu.com in the forward search area. OK, then we right-click on the baidu.com file and select New Host. Add the name to the new host: www,IP address 192.168.1.1 and select add host. At this point, you can see another A record on the right.

We just built a new Baidu DNS, just like we built Google and Bing.

DNS is configured, in fact, it is very simple.

Next we go back to our IIS Information Services Manager, find our Baidu, website, and right-click Properties.

IP address is still 192.168.1.1, port is still 80, then click Advanced, select 192.168.1.1, then select Edit, enter www.baidu.com in the host header value. The rest is confirmed all the way.

The other two are in the same configuration. I won't go into details here.

Finally, we have to test. Here we need to set the DNS of the tested server to the IP address of the server. This is 192.168.1.1. You'd better take a look at the successful screen.

The above is all the contents of the article "how to set up multiple websites on an IIS server at the same time". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report