Win2008 r2 IIS7.5制定目录禁止执行脚本的方法
更新时间:2016年7月4日 17:51 点击:1311
之前脚本之家发布过一篇文章具体的可以参考这篇文章:
http://www.jb51.net/article/56566.htm
参考了万网,服务器Windows2008 IIS7.5可以做一下设置禁用脚本的执行方法--------需要禁止某个目录的脚本执行权限,您可以在要禁用脚本执行权限的目录建立一个web.config文件,里面加入下面的代码:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers> <remove name="ASPClassic" /> <remove name="PHP-FastCGI" /> <remove name="ASPNET-ISAPI-1.1-AXD" /> <remove name="ASPNET-ISAPI-1.1-HttpRemotingHandlerFactory-rem" /> <remove name="ASPNET-ISAPI-1.1-HttpRemotingHandlerFactory-soap" /> <remove name="ASPNET-ISAPI-1.1-PageHandlerFactory" /> <remove name="ASPNET-ISAPI-1.1-SimpleHandlerFactory" /> <remove name="ASPNET-ISAPI-1.1-WebServiceHandlerFactory" /> <remove name="AssemblyResourceLoader-Integrated" /> <remove name="AXD-ISAPI-2.0" /> <remove name="AXD-ISAPI-2.0-64" /> <remove name="HttpRemotingHandlerFactory-rem-Integrated" /> <remove name="HttpRemotingHandlerFactory-rem-ISAPI-2.0" /> <remove name="HttpRemotingHandlerFactory-rem-ISAPI-2.0-64" /> <remove name="HttpRemotingHandlerFactory-soap-Integrated" /> <remove name="HttpRemotingHandlerFactory-soap-ISAPI-2.0" /> <remove name="HttpRemotingHandlerFactory-soap-ISAPI-2.0-64" /> <remove name="PageHandlerFactory-Integrated" /> <remove name="PageHandlerFactory-ISAPI-2.0" /> <remove name="PageHandlerFactory-ISAPI-2.0-64" /> <remove name="Perl-CGI" /> <remove name="Perl-ISAPI" /> <remove name="rules-64-ISAPI-2.0" /> <remove name="rules-Integrated" /> <remove name="rules-ISAPI-2.0" /> <remove name="SecurityCertificate" /> <remove name="SimpleHandlerFactory-Integrated" /> <remove name="SimpleHandlerFactory-ISAPI-2.0" /> <remove name="SimpleHandlerFactory-ISAPI-2.0-64" /> <remove name="svc-Integrated" /> <remove name="svc-ISAPI-2.0" /> <remove name="svc-ISAPI-2.0-64" /> <remove name="TraceHandler-Integrated" /> <remove name="TRACEVerbHandler" /> <remove name="WebAdminHandler-Integrated" /> <remove name="WebServiceHandlerFactory-Integrated" /> <remove name="WebServiceHandlerFactory-ISAPI-2.0" /> <remove name="WebServiceHandlerFactory-ISAPI-2.0-64" /> <remove name="xoml-64-ISAPI-2.0" /> <remove name="xoml-Integrated" /> <remove name="xoml-ISAPI-2.0" /> </handlers> </system.webServer> </configuration>
保存后就设置了该文件夹以及子容器只有读的权限,而没有脚本执行权限。如果要恢复脚本权限就直接删除该目录下的web.config文件。
脚本之家小编注:这个web.config不是放在根目录,而是放到你将取消执行权限的目录。例如/uploads里面。以前2003的时候需要在服务器端手工一个一个的设置,这样通过ftp就可以方便的控制文件夹的执行权限了。
相关文章
- 这篇文章主要介绍了Win10 IIS 安装及.net 4.5及Win10安装IIS并配置ASP.NET 4.0的方法,本文给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下...2021-09-22
- 这篇文章主要以图文结合的方式详细介绍了本地Windows 78上IIS服务器搭建教程,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 ...2017-07-06
- 这篇文章主要介绍了IIS中保持HTTP连接的设置方法,需要的朋友可以参考下...2016-01-27
- 后台内容无法更新,如基本设置保存不了,数据库写不进去,很有可能是Everyone权限问题,即Everyone 无权操作文件夹,按照下面的步骤操作即可...2016-01-27
- 这篇文章主要介绍了C#修改IIS站点framework版本号的方法,涉及C#调用使用ASP.NET IIS注册工具Aspnet_regiis.exe进行IIS站点framework版本号修改的方法,具有一定参考借鉴价值,需要的朋友可以参考下...2020-06-25
IIS中User-mode caching引起的Cache-Control不为public问题的解决方法
在IIS的Output caching中如果启用了User-mode caching将引起Cache-Control为no-cache,从而造成页面不能被浏览器或代理服务器缓存,下面看解决方法...2016-01-27- 下面我们以WIN2000服务器版本的来做例子,介绍一下怎样利用SSL加密HTTP通道来加强IIS安全的,需要的朋友可以参考下...2017-07-06
- 一直以为windows下用nginx来配置反向代理,没想到微软官方也出了这个东西,特分享下, 方便需要的朋友...2016-01-27
- 应一个朋友要求写了这个批处理程序,主要用途就是在win32系统中方便停止、开启、重启IIS、MySQL服务。 ...2016-01-27
IIS 环境下配置PHP5+MySql+PHPMyAdmin
虽然主要是做.net开发的,但是,时不时的还要搞一下php,但是,php在windows下的配置,总是走很多弯路,正好前几天又配置了一下,因此总结在这里,做为自己的备忘,也希望给遇到问题的朋友们提供一些帮助。...2016-01-27IIS下Zend 出现 Unable to view file mapping 问题的解决方法汇总
这篇文章主要介绍了IIS下Zend 出现 Unable to view file mapping 问题的解决方法汇总,需要的朋友可以参考下...2016-01-27- 每个网管最黑暗的时候莫过于服务器被攻击后的束手无策,其实服务器遭受攻击后,服务器的记录文件详细地记录了黑客活动的蛛丝马迹。...2016-01-27
- 这篇文章主要介绍了iis伪静态中文url出现乱码的解决办法,需要的朋友可以参考下...2017-07-06
- 你的网站是不是常常被黑,或者一不注意就成了黑客的“肉鸡”?对于Web网站服务器来说,如果不进行安全设置,很容易被黑客“盯上”,随时都有被入侵的危险。...2016-01-27
- MyIIS 做了部分,程序只写了些函数(带数据库),具体调用各位写逻辑程序实现...2016-01-27
- 这篇文章主要介绍了IIS自定义404错误页避免暴露.NET网站路径信息,在输入非.aspx页面时,显示默认404页面,暴露站点路径信息,本文就给出了一个解决方法,需要的朋友可以参考下...2016-01-27
- 如果您运行的是 64 位 Windows,请从 %windir%\system32\inetsrv 目录而不是 %windir%\syswow64\inetsrv 目录中使用 Appcmd.exe...2016-01-27
- IIS无法显示中文名称图片,但可以通过下面的方法,以后iis下用中文命名的图片也可显示了,但不建议用中文命名图片...2016-01-27
- Win server2003 IIS的安装方法,不论是卸载重新安装,还是初次安装都需要知道的。默认情况下iis是不安装的。...2016-01-27
- 前几天在IIS的配置上出了些问题,到网上查找了些资料,顺便整理放在这里,希望对大家有帮助 ...2016-01-27