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

Web server site settings and IIS installation

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Create a new virtual machine named Web as the Web server, assign it the IP address 192.168.1.5, change the computer name to Web, activate the system and join to the domain, and finally create a snapshot.

1. Installation and testing of IIS

First, you still need to install the Web Server (IIS) role in Server Manager

IIS 7.5 is divided into more than 40 modules with different functions, and administrators can customize and install the corresponding functional modules according to their needs, which can reduce the acceptance area of Web websites and greatly improve their security and performance. So the default setting is used in the "Select role Service" step, and only the most basic functional modules are installed

After the installation is completed, you can manage the ISS website through the Internet Information Services (IIS) Manager in the Administrative tools. You can see that a site called Default Web Site has been built. Open the IE browser on the client computer client1, and enter the IP address of the Web server in the address bar to access the default website.

You can also add a host record to the DNS server for the Web server, so that the website can be accessed through the domain name www.coolpen.net

2. Basic configuration of the website * *

Select the default site in IIS Manager. In the "Default Web Site Home Page" pane, you can configure the default site, and in the actions panel on the right, you can operate on the site.

Here are some basic settings for the default site to better meet our needs.

Configure IP address and port

Note: by default, the Web site automatically binds all IP addresses on the local computer on port TCP 80, and users can access it using any IP address on the Web server. Therefore, you need to specify a unique IP address and port for the Web site. Click bind in the actions panel on the right to open the site binding dialog box. You can see that the IP address is displayed as "*", indicating that all IP addresses are bound.

Click "add" button to set. "Type" is the transport protocol used to access the website. By default, http; sets "IP address" to the specified IP; "port" general.

The default port 80 is used (see figure Amur7). Of course, it can also be set to any other port. At this time, when the client accesses the website, you must enter the corresponding port number. For example, if you change the port of the site to 8000, the user can enter "http://www.coolpen.net:8000" in the browser to access the website.

two。 Configure home directory

The home directory is the root directory of the website, which stores the web pages, pictures and other data of the website, and is used to store the folder of the website. When the client visits the site, the Web server automatically displays the default web page in the folder to the client user.

For example, if you set the home directory of the website to D://www, type http://localhost/index.html in the browser and access D:\ www\ index.html

If you set the home directory of the Web site to E:\ asp\ index.asp, enter http://localhost/index.asp in the browser and access the E:\ asp\ index.asp file. The home directory of the IIS default Web site is "% SystemDrive%\ inetpub\ wwwroot", where "% System-Drive%" represents the system partition, usually C. You can click basic Settings in the actions window on the right side of the default site to set the home directory

3. Configure the default document

When visiting the home page of a web page, you usually only need to enter the domain name of the website to open it, but there is no need to enter the name of the web page. In fact, the web page displayed at this time is the default document.

Usually, the home page of a website is set as the default document. You can open the default document in the main window of the default site to set it.

You can see that the system comes with five default documents: Default.htm, Default.asp, index.htm, index.html, and iisstart.html, with priority from high to low. The Web file that serves as the home page of the site must use one of the above five names, and if it is another name, it must be added to the document list.

Below, in the home directory of the default website, use notepad to arbitrarily edit a web page file named Default.htm (note that D should be uppercase and lowercase), and then visit the website on the client side and find that you can successfully open the set home page.

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