<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[歌声与微笑]]></title> 
<link>http://www.gsywx.com/index.php</link> 
<description><![CDATA[歌声与微笑]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[歌声与微笑]]></copyright>
<item>
<link>http://www.gsywx.com/read.php/.htm</link>
<title><![CDATA[nginx设置上传目录无执行权限]]></title> 
<author>admin &lt;admin@gsywx.com&gt;</author>
<category><![CDATA[电脑类]]></category>
<pubDate>Fri, 30 Apr 2010 00:36:27 +0000</pubDate> 
<guid>http://www.gsywx.com/read.php/.htm</guid> 
<description>
<![CDATA[ 
	在windows+iis下，可以设置上传目录，类似:upload,uploadfile,attachments，这样的目录下面无脚本执行权限，从而防止非法用户上传脚本得到webshell<br/>nginx上也很简单，我们使用location。。如下：<br/><br/>location ~ ^/upload/.*&#92;.(php&#124;php5)$<br/>&#123;<br/>deny all;<br/>&#125;<br/><br/>其中upload换为你要设置的目录名字<br/><br/>这条规则的含义是匹配请求连接中开头是/upload/，中间匹配任意字符，结尾匹配.php或者.php5的页面，最后利用deny all禁止访问，这样就防止了上传目录的脚本执行权限<br/>Tags - <a href="http://www.gsywx.com/go.php/tags/nginx/" rel="tag">nginx</a>
]]>
</description>
</item><item>
<link>http://www.gsywx.com/read.php/.htm#blogcomment</link>
<title><![CDATA[[评论] nginx设置上传目录无执行权限]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.gsywx.com/read.php/.htm#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>