Recently, a problem occurred with the company web site, and most of the log files under all sites end in. txt. Causes the file content to be viewed directly from outside through the absolute path of the log file, which is a security risk. Such as:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/64/wKioL1SBLm6g-YLGAAA3BJCzALc655.jpg "title=" 1.jpg " alt= "Wkiol1sblm6g-ylgaaa3bjczalc655.jpg"/>
Workaround: (This case is IIS 7.0)
1. In IIS, locate the "Request to delete" option:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/66/wKiom1SBLimjmZDBAAH0TCoFphY397.jpg "title=" 2.jpg " alt= "Wkiom1sblimjmzdbaah0tcofphy397.jpg"/>
2. Double-click to add the Forbidden file name suffix after access:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/54/66/wKiom1SBLnKhSuJhAAI4kTVl-PA912.jpg "title=" 3.jpg " alt= "Wkiom1sblnkhsujhaai4ktvl-pa912.jpg"/>650) this.width=650; src=/e/u261/themes/default/images/spacer.gif "Style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
3. Add the end of ". txt" to the Prohibit Access column as:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/65/wKioL1SBL1fy_jY2AAIfbV7Ie7s761.jpg "title=" 4.jpg " alt= "Wkiol1sbl1fy_jy2aaifbv7ie7s761.jpg"/>
4. Re-visit the tests such as:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/54/66/wKiom1SBLxCT55oPAACyzRtZRTA773.jpg "title=" 5.jpg " alt= "Wkiom1sblxct55opaacyzrtzrta773.jpg"/>
5. (Note: If there is more than one site on a server (and each site needs to add a. txt forbidden filter), it is not necessary to add a site to a site, the following method:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/54/68/wKiom1SBSaOB_QBIAAOoXJmhuZ8089.jpg "title=" 1.jpg " alt= "Wkiom1sbsaob_qbiaaooxjmhuz8089.jpg"/>
This adds ". txt request Filtering" to this IIS, and all sites under this IIS will deny. txt access.
This article is from the "Anna--linux House" blog, please make sure to keep this source http://cold2076goddess.blog.51cto.com/8695962/1586586
IIS security optimization (prevents the file content from being explored externally through the absolute path of the file under the site domain name)