Server is a high-performance computer. As a node of the network, it stores and processes 80% of the data and information on the network. Therefore, it is also known as the soul of the network. So how to configure the web server? If you don't know, please see my detailed explanation of web server configuration method!
IIS installation
Generally, IIS is not installed by default when installing the operating system, so IIS needs to be installed when configuring the web server for the first time. Installation method:
1. Open "control panel", open "add / Remove Programs", and the "add / Remove Programs" window pops up.
2. Click the "add / remove windows components" icon in the window to pop up the "windows components Wizard" dialog box.
3. Select the application server check box in the wizard. Click Details to open the Application Server dialog box.
4. Select the required components, among which "Internet Information Service (IIS)" and "application server console" must be selected. Select "Internet Information Service (IIS)" and then click "details" to pop up the "Internet Information Service (IIS)" dialog box.
5. Select "Internet Information Service Manager" and "World Wide Web service". After selecting World Wide Web service, click Details to open the World Wide Web Service dialog box.
6. The "World Wide Web service" must be selected. If you want the server to support ASP, you should also check "active server pages". Click the "OK" button one by one to close each dialog box until you return to the "windows component Wizard" dialog box in Figure 1.
7. Click the "next" button to start the installation of IIS. During this period, it may be required to insert the Windows Server 2003 installation disk, and the system will install automatically.
8. After the installation is completed, a dialog box will pop up indicating that the installation is successful. Click OK to complete the installation of IIS.
Friendly tip: if you want to load the FTP server at the same time, you should also select the check box of "file transfer protocol (FTP) service" in the "Internet Information Service (IIS)" dialog box.
Create a web site in IIS
Open Internet Information Service Manager, right-click website in the directory tree, select new → website in the right-click menu, and the website creation wizard pops up:
The website description is the name of the website. It will be displayed in the directory tree of IIS window to facilitate the administrator to identify each site. In this case, it is called "website of branches and leaves".
Website IP address: if "all unassigned" is selected, the server will bind all local IP addresses to the website. This option is applicable to the case where there is only one website in the server. You can also select an IP address from the drop-down list box (the drop-down list box lists the configured IP address of the machine. If not, you should configure the IP address for the machine first and then select.)
TCP port: the default port number 80 is generally used. If it is changed to other values, the user must add the port number to the address when accessing the site.
Host header: if the site already has a domain name, you can enter the domain name in the host header.
The home directory path is the location of the root directory of the website. You can use the Browse button to select a folder as the home directory of the website.
Website access permission is the permission to limit users' access to the website. "Read" is necessary, "run script" can make the site support ASP, and other permissions can be set as needed.
Click next to pop up the finish Wizard dialog box, which completes the creation of the new website. You can see the new website in IIS. Copy the completed web pages and related files to the home directory, and you can usually visit this website.
The way to access the website is: if you access it on this computer, you can enter it in the address bar of the browser“ http://localhost/ ”; If you access it on other computers in the network, you can enter "http: / / website IP address" in the address bar of the browser.
Note: if the TCP port of the website is not 80, the port number needs to be added to the address. Assuming that the TCP port is set to 8080, the access address should be written as“ http://localhost:8080/ ”Or "http: / / website IP address: 8080".
Basic configuration of website
If you need to modify the parameters of the website, you can right-click website name and select Properties in the right-click menu to open the website Properties dialog box.
1. "Website" label
"Website identity": you can set the website name, IP address and port number. Click the advanced button to set the host header name.
2. "Home directory" label
In the local path, you can set the path name and access rights of the home directory.
3. Document label
Default document refers to the default page you want to open when visiting a website. This page is usually the home page of the website. If the default document is not enabled or the home page file name of the website is not in the default document list, you need to indicate the file name in the address when accessing the website.
There are initially only four file names in the default document list: default htm、Default. asp、index. Htm and default aspx。 I added an index with the "add" button ASP, and use the "move up" button to move it to the top. This is mainly because the home page of my website is called "index. ASP", so it should be added to the list. It doesn't matter whether it is at the top of the list.
After the above configuration, a web site can be used. Copy the created web page to the main directory of the website, and the file name of the website home page should be included in the default document. Open the browser and enter "http: / / local IP address" in the address bar to open the home page of the website. Other pages can be opened with hyperlinks in the web page.
Virtual directory
Virtual directory can make a website do not have to put all content in the home directory. From the user's point of view, the virtual directory is still within the main directory, but the actual location can be in other locations of the computer, and the name of the virtual directory can also be different from the real directory. For example:
In the figure, the user sees a folder "pic" under the home directory. Its real location is at "D: myimage" of the server, and the home directory is at "C: mywww". Assuming that the domain name of the website is "www.abc. Com", the user will visit“ http://www.abc.com/pic/ When "file 1", the actual location accessed is "D: myimage file 1" of the server, so the real name and location of the virtual directory are unknown to the user.
How to create a virtual directory:
Open the Internet information service window, right-click the web site where you want to create a virtual directory, and select new → virtual directory. Pop up the virtual directory creation wizard:
Alias is the mapped name, that is, the name of the customer when accessing;
Path: the real path name on the server, that is, the actual location of the virtual directory;
Access permission: refers to the customer's access permission to the directory.
Click next to open the completion dialog box, and the virtual directory will be established successfully. Copy the relevant files to the virtual directory, and users can access the specified files according to the virtual tree structure.
Usually, the access rights and default documents of the virtual directory inherit the independent directory. If you need to modify, you can right-click the virtual directory in the Internet information service manager and select properties to modify the parameter settings of the virtual directory.
Supplement: server introduction
Servers, also known as servers, are devices that provide computing services. Since the server needs to respond to service requests and process them, generally speaking, the server should have the ability to undertake services and ensure services.
The composition of the server includes processor, hard disk, memory, system bus, etc., which is similar to the general computer architecture. However, due to the need to provide highly reliable services, it requires high processing capacity, stability, reliability, security, scalability, manageability and so on.
In the network environment, according to the different types of services provided by the server, it is divided into file server, database server, application server, web server, etc.
Related reading: what are the server FAQs
1. System blue screen, frequent crash, restart, slow response
The of the server is very similar to our ordinary computer, whether it is hardware structure or running system. Therefore, just like our computers, they may be infected with viruses, crash, blue screen, restart and other failures due to system vulnerabilities, software conflicts and hardware failures, and slow response due to too much garbage cache information.
2. The remote desktop connection exceeds the maximum number of connections
Since the server allows 2 connections by default, if you forget to log off after logging in and directly close the remote desktop, the server recognizes that the login is still on the server side. In this case, the most common is to restart the server. However, if it is the peak period, the loss caused by restarting the server is obvious. At this time, you can use the mstsc / console command to forcibly log in. Open the "run" box and type "mstsc / V: xxx.xxx.xxx.xxx (server IP) / console" to forcibly log in to the remote desktop.
3. How to clean up files that cannot be deleted
In this case, it may be that the file is still running. You can restart and delete it, or run CMD, enter the name of the folder arrtib-a-s-h-r you want to delete, and finally enter the name of the folder del wants to delete. It cannot be recovered after running this command. Please use it with caution.
4. Hidden trouble of system port
For the server, the first thing is to ensure stability and security. Therefore, we only need to ensure the most basic functions of the server, just like the sound card is prohibited by default. We don't need too many functions and port support. For example, some unnecessary and high-risk ports can be blocked. For some necessary and risky ports, such as ports 3389 and 80, we can set them as non-special secret ports by modifying the registry, so that the security hidden dangers of server ports no longer exist.