<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>waimv.com &#187; apache</title>
	<atom:link href="http://www.waimv.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.waimv.com</link>
	<description></description>
	<lastBuildDate>Fri, 09 Nov 2018 10:41:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>nginx apache 执行php脚本限制</title>
		<link>http://www.waimv.com/linux/195/</link>
		<comments>http://www.waimv.com/linux/195/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 02:04:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.szpian.com/?p=195</guid>
		<description><![CDATA[Apache环境规则内容如下：Apache执行php脚本限制 把这些规则添加到.htaccess文件中 RewriteEngine on RewriteCond % !^$ RewriteRule uploads/(.*).(php)$ – [F] RewriteRule data/(.*).(php)$ – [F] RewriteRule templets/(.*).(php)$ –[F] nginx环境规则内容如下：nginx执行php脚本限制 LNMP有一个缺点就是目录权限设置上不如Apache，有时候网站程序存在上传漏洞或类似pathinfo的漏洞从而导致被上传了php木马，而给网站和服务器带来比较大危险。建议将网站目录的PHP权限去掉，当访问上传目录下的php文件时就会返回403错误。 首先要编辑nginx的虚拟主机配置，在fastcgi的location语句的前面按下面的内容添加： location ~ /(data&#124;uploads&#124;templets)/.*\.(php&#124;php5)?$ { deny all; }]]></description>
			<content:encoded><![CDATA[<p>Apache环境规则内容如下：<strong>Apache执行php脚本限制</strong> 把这些规则添加到.htaccess文件中</p>
<blockquote><p>RewriteEngine on RewriteCond % !^$</p>
<p>RewriteRule uploads/(.*).(php)$ – [F]</p>
<p>RewriteRule data/(.*).(php)$ – [F]</p>
<p>RewriteRule templets/(.*).(php)$ –[F]</p>
<p>nginx环境规则内容如下：<strong>nginx执行php脚本限制</strong></p>
<p>LNMP有一个缺点就是目录权限设置上不如Apache，有时候网站程序存在上传漏洞或类似pathinfo的漏洞从而导致被上传了php木马，而给网站和服务器带来比较大危险。建议将网站目录的PHP权限去掉，当访问上传目录下的php文件时就会返回403错误。</p>
<p>首先要编辑nginx的虚拟主机配置，在fastcgi的location语句的前面按下面的内容添加：</p>
<blockquote><p>location ~ /(data|uploads|templets)/.*\.(php|php5)?$ {</p>
<p>deny all;</p>
<p>}</p></blockquote>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.waimv.com/linux/195/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache 虚拟主机</title>
		<link>http://www.waimv.com/linux/80/</link>
		<comments>http://www.waimv.com/linux/80/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 03:57:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.szpian.com/?p=80</guid>
		<description><![CDATA[NameVirtualHost *:80 &#60;VirtualHost *:80&#62; ServerName localhost DocumentRoot D:\root &#60;/VirtualHost&#62; &#60;VirtualHost *:80&#62; ServerName ndj.iciba.com DocumentRoot D:\root\dj\dj.iciba.com\webapp\dj.iciba.com\wwwroot RewriteEngine On RewriteRule ^/([a-z]+).shtml$ /list.php?tag=$1 RewriteRule ^/([a-z]+)_(\d+).shtml$ /list.php?tag=$1&#38;page=$2 RewriteRule ^/flash/([a-z]+)/(\d+).shtml$ /flash.php?flashid=$2 &#60;/VirtualHost&#62;]]></description>
			<content:encoded><![CDATA[<p>NameVirtualHost *:80</p>
<p>&lt;VirtualHost *:80&gt;<br />
ServerName localhost<br />
DocumentRoot D:\root<br />
&lt;/VirtualHost&gt;</p>
<p>&lt;VirtualHost *:80&gt;<br />
ServerName ndj.iciba.com<br />
DocumentRoot D:\root\dj\dj.iciba.com\webapp\dj.iciba.com\wwwroot<br />
RewriteEngine On<br />
RewriteRule ^/([a-z]+).shtml$ /list.php?tag=$1<br />
RewriteRule ^/([a-z]+)_(\d+).shtml$ /list.php?tag=$1&amp;page=$2<br />
RewriteRule ^/flash/([a-z]+)/(\d+).shtml$ /flash.php?flashid=$2<br />
&lt;/VirtualHost&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.waimv.com/linux/80/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
