Optimize Win 2003 server IIS6.0 to reduce WEB pressure

  
        

Initial contact with Windows server 2003 server friends when using IIS, it is not clear about some common settings of IIS, and even set up indiscriminately, causing the WEB server not to run properly, server pressure, performance degradation, etc., let us understand Here are a few of the things that IIS needs to be set up correctly.

IIS6.0 extension service

1, prohibit redundant Web service extensions

IIS6.0 supports a variety of service extensions, some administrators are lazy or not seeking solutions, worry about the Web A parsing error occurred during the run, and all Web service extensions were enabled when the site was built. As everyone knows, some of these extensions such as "all unknown CGI extensions", "in the server-side include files", etc. are not used in the Web run, but also take up IIS resources affect performance drag the Web, and even some These extensions are vulnerable to exploitation by attackers. Therefore, the scientific principle is what extensions are enabled for what extensions are used.

If the enterprise site is a static page, then do not open any extensions. However, today's enterprise sites are interactive dynamic pages such as asp, php, jsp and so on. If it is an asp page, just open “Active Server Pages” For php, jsp and other dynamic pages, IIS6.0 is not supported by default. It is necessary to install the corresponding components to support these extensions. However, extensions that are not used at this time can be completely disabled.

The operation of disabling Web service extension is very simple. Open “IIS Manager", click “Web Service Extensions in the left pane, select the corresponding extension on the right, and then click “ Disable ”

2, delete unnecessary IIS extension mapping

IIS supports support for .asp, .cdx and other 8 extensions, which are used in addition to .asp. Not enough. These inconsistencies will increase the burden on the web server and bring certain security risks. For example, .asa, .cer and other extensions can be used by attackers to get webshell. Because the general asp system will limit the upload of asp files, but if there is no restriction on .asa or .cer extensions, the attacker can change the file suffix to break the upload limit and run .asa or .cer files to get the webshell.

To delete the IIS extension, open the IIS Manager, right-click on the "Default Web Site" and select "Attributes", click on the "Home Directory" tab, and then click on “ Configure ” Open the application window, and finally select unnecessary application mappings such as .shtml, .shtm, .stm, etc. according to your needs, and then click “delete”

3, cancel access records

IIS6.0 default to open access records for the web. When logging is turned on, IIS will faithfully record all web access records. The contents of these log files are very complex, such as access time, client IP, which link to access, cookies, etc., as well as Method, UserAgent, etc. These records not only take up a lot of disk space but also greatly affect the performance of the web server. Someone has done a review, stopping access to records can improve web performance by 5% to 8%. Moreover, these records are of little use to the average user, especially small and medium-sized Web sites, and are too costly to system performance, so it is recommended to turn it off.

To cancel access to the record is: open the IIS Manager, navigate to the specific web site, right click and select "Attributes", and cancel the "record access" under the "Main Directory" tab. & rdquo; check can be.

4, restrict access traffic

By default, IIS 6.0 has no limit on the amount of access. If the concurrent connection is too large, the network load is too light, then network congestion occurs. Causes the server to crash. Therefore, it is necessary to limit the access of users and control the traffic of web access.

Open the “Internet Information Service” manager and click on the “+”” in front of the host name on the right side of the window to locate it on a Web site. Select the Web site and right-click to select “Properties>, select the “Performance" tab in the opened property settings window, and select the "Enable bandwidth limit" checkbox to be activated in the subsequent "Maximum" In the Network Usage > setting box, specify the specific value of your network site bandwidth. You can continue to set up based on the performance of the server and its traffic. It is almost the same for a typical enterprise site to set the bandwidth traffic to 1500 kb/s. At the same time, you can set the connection limit under “Website Connection”, you can set a value according to the situation. After completing the above settings, IIS can only use the resources it is granted to perform Web services, which eliminates the server overload caused by abnormal conditions and reduces the burden on the Web.

5, let the web load freely scalable

By default, IIS is fully loaded for the Web, which adds to the Web burden to some extent. How can I automatically adjust the work process automatically according to load changes?

With IIS 6.0 Web Park, we only need to specify the number of work processes for an application pool to implement each Web site. The isolation between the two. The specific configuration steps are as follows: Open the application pool's "Properties" dialog box in the "Internet Information Service" manager, go to the "Performance" page, under "Web Garden", “ Maximum number of working processes & rdquo; Enter the number of processes in the input box. When the server load is small and no additional work processes are required, IIS 6.0 automatically reduces the actual number of worker processes after a certain amount of time (default 20 minutes, configurable); if the load becomes larger, additional work processes are required, IIS 6.0 again increases the number of work processes. In addition, you can also “enable CUP monitoring”, set “Maximum CPU usage”, “Refresh CUP usage value” and “CPU usage exceeds maximum usage is the action performed”, these settings It can be set as needed. When everything is set up, it's all done to IIS automatically, without administrator intervention.

6, configure the application rendering pool

IIS can support multiple Web services, especially virtual hosting, there are many Web sites on a server. How can we make each site independent of each other, and not affect other sites due to the failure of some Web sites? It is a good solution to specify application pools for different work processes.

(1), create

Open “IIS Manager”, expand the local computer, right click on "Application Pool", select “New → Application Pool”. In the "Application Pool Name" box, enter a new application pool name. If you select “Use existing application pool as template”, you can select the corresponding application pool in the “Application pool name” list, and finally click “OK”.

(2), Assign

In “IIS Manager, right-click the site for which you want to assign an application pool and click “Properties”. In the properties panel of the site, click the “Home Directory” tab and select the application pool you just created in the “Application Pool” drop-down list. If all the options are grayed out, click the “Create” button to enter “app name”, then in the “application pool” list box, select and assign the application pool for the site.

(3), Recycling

Use the "Recycling" function, but set how to restore system resources for flexible customization of IIS resource usage. Open the “IIS Management Console", click “+” and then expand the local computer → application pool”. Select the application pool you want to recycle, right-click and select "Properties", the application pool's properties dialog box appears, click the "Recycle" tab under which you can set "Process Recycling", “ Memory Recycling, etc., all of these settings are set according to actual needs.
Summary: Through the above IIS optimization measures, the performance of the Web server can be lightly loaded and will be greatly improved. Of course, to fundamentally improve web performance, just making soft settings is not enough. In addition, hardware transformation is required, and the combination of software and hardware is the perfect solution.

Copyright © Windows knowledge All Rights Reserved