织梦dedecms程序安全设置
对于已经被入侵的网站,请按以下教程操作: ①.下载专杀工具进行扫描查杀: http://faq.myhostadmin.net/faq/listagent.asp?unid=673 然后重新生成文件。 相关文件: 浅谈虚拟主机网站安全设置 将网站权限设置为完全控制(可读可写): http://www.west.cn/faq/list.asp?unid=286 5、利用伪静态取消目录执行脚本 linux系统: 新建一个txt文本文件,用文本编辑器打开,复制以下规则保存,上传到网站根目录,将文件重新命名.htaccess(注意有点) RewriteEngine on #安全设置 禁止以下目录运行指定php脚本 RewriteCond % !^$ RewriteRule a/(.*).(php)$ – [F] RewriteRule data/(.*).(php)$ – [F] RewriteRule images/(.*).(php)$ – [F] RewriteRule css/(.*).(php)$ – [F] RewriteRule js/(.*).(php)$ – [F] RewriteRule style/(.*).(php)$ – [F] RewriteRule skin/(.*).(php)$ – [F] RewriteRule templets/(.*).(php|htm)$ – [F] RewriteRule uploads/(.*).(php)$ – [F] windows系统: 新建一个txt文本文件,用文本编辑器打开,复制以下规则保存,上传到网站根目录,将文件重新命名web.config。 如果网站目录原本有web.config文件,仅复制以下红色部分,添加到<rules>这行后面 <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Block a" stopProcessing="true"> <match url="^a/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="a" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block data" stopProcessing="true"> <match url="^data/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="data" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block skin" stopProcessing="true"> <match url="^skin/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="skin" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block style" stopProcessing="true"> <match url="^style/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="style" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block css" stopProcessing="true"> <match url="^css/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="css" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block js" stopProcessing="true"> <match url="^js/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="js" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block images" stopProcessing="true"> <match url="^images/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="images" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block templets" stopProcessing="true"> <match url="^templets/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="templets" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> <rule name="Block uploads" stopProcessing="true"> <match url="^uploads/(.*).php$" /> <conditions logicalGrouping="MatchAny"> <add input="{USER_AGENT}" pattern="uploads" /> <add input="{REMOTE_ADDR}" pattern="" /> </conditions> <action type="AbortRequest" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
|
|||||
>> 相关文章 | |||||