<?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/"
xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
><channel><title>Himmel &#187; rewrite</title> <atom:link href="http://lazing.ave7.net/tag/rewrite/feed/" rel="self" type="application/rss+xml" /><link>http://lazing.ave7.net</link> <description>时间很长；现在很短；距离很长；相遇很短</description> <lastBuildDate>Wed, 11 Jan 2012 18:03:14 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license> <item><title>继续说Apache的优化</title><link>http://lazing.ave7.net/2009/apache-went-on-to-say-that-the-optimization/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apache-went-on-to-say-that-the-optimization</link> <comments>http://lazing.ave7.net/2009/apache-went-on-to-say-that-the-optimization/#comments</comments> <pubDate>Sat, 23 May 2009 15:49:46 +0000</pubDate> <dc:creator>某L</dc:creator> <category><![CDATA[Hardware and OS]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[rewrite]]></category> <category><![CDATA[server]]></category> <category><![CDATA[tuning]]></category> <category><![CDATA[服务器]]></category> <category><![CDATA[调优]]></category><guid isPermaLink="false">http://lazing.ave7.net/2009/%e7%bb%a7%e7%bb%ad%e8%af%b4apache%e7%9a%84%e4%bc%98%e5%8c%96/</guid> <description><![CDATA[经过了前面一段时间的探索，我们对Apache和MySql的性能调优有了个初步的认识，我本来以为问题到这里应该就解决了，但是运行了十几天后，还是出现了负载达到50+的情况。于是，网站又挂了。 分析access.log与之前并无不同，被盗链的请求还是很多，不过这些都被302重定向了啊，死活想不到办法，一度怀疑是不是因为302或者404的错误日志过多的引起的IO问题导致服务器资源紧张。 除此之外，还是有个现象引起了注意，每次挂掉的不是Apache，而是数据库。为什么盗链会引起数据库问题，这显然无法解释。 不绕圈子了，最后发现的问题，就是为了防盗链而特意写的Rewrite。原本的rewrite是这样的，对于盗链的资源，重定向到首页。 这看起来没有问题，可是瞬间请求数百次到首页，然后运行脚本，执行数据库查询…… 还有一点，返回的是302，这就意味着搜索引擎和下载工具会认为资源是存在的，不会停止响应。 所以，最终的解决方案。重定向所有盗链的资源到一个静态LOGO，同时，设定返回Code为403. 整个世界清净了。 Windows下Apache Tomcat Jk 1.3 简明配置摘要 Linux Web服务器性能调优 &#8211; Apache的工作模式及配置 Apache性能调优 Linux WEB服务器性能调优 &#8211; 工具箱 性能调优：MySql Server at Linux Rating: 0.0/5 (0 votes cast)<br /><div><img src="http://lazing.ave7.net/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br />]]></description> <content:encoded><![CDATA[<p>经过了前面一段时间的探索，我们对<a href="http://lazing.ave7.net/2009/apache-performance-tuning/">Apache</a>和<a href="http://lazing.ave7.net/2009/performance-tuning-mysql-server-at-linux/">MySql</a>的性能调优有了个初步的认识，我本来以为问题到这里应该就解决了，但是运行了十几天后，还是出现了负载达到50+的情况。于是，网站又挂了。</p><p>分析access.log与之前并无不同，被盗链的请求还是很多，不过这些都被302重定向了啊，死活想不到办法，一度怀疑是不是因为302或者404的错误日志过多的引起的IO问题导致服务器资源紧张。</p><p>除此之外，还是有个现象引起了注意，每次挂掉的不是Apache，而是数据库。为什么盗链会引起数据库问题，这显然无法解释。</p><p>不绕圈子了，最后发现的问题，就是为了防盗链而特意写的<a href="http://www.widexl.com/tutorials/mod_rewrite.html">Rewrite</a>。原本的rewrite是这样的，对于盗链的资源，重定向到首页。</p><p>这看起来没有问题，可是瞬间请求数百次到首页，然后运行脚本，执行数据库查询……</p><p>还有一点，返回的是302，这就意味着搜索引擎和下载工具会认为资源是存在的，不会停止响应。</p><p>所以，最终的解决方案。重定向所有盗链的资源到一个静态LOGO，同时，设定返回Code为403.</p><p>整个世界清净了。<ul><li><a href="http://lazing.ave7.net/2009/linux-compile-problem-finishing-php/" rel="bookmark" title="2009/04/26">Linux编译PHP问题整理</a></li><li><a href="http://lazing.ave7.net/2011/linux-web-server-tunning-toolbox/" rel="bookmark" title="2011/09/03">Linux WEB服务器性能调优 &#8211; 工具箱</a></li><li><a href="http://lazing.ave7.net/2009/apache-performance-tuning/" rel="bookmark" title="2009/04/26">Apache性能调优</a></li><li><a href="http://lazing.ave7.net/2011/linux-server-tunning-apache-mpm-configuration/" rel="bookmark" title="2011/09/03">Linux Web服务器性能调优 &#8211; Apache的工作模式及配置</a></li><li><a href="http://lazing.ave7.net/2009/performance-tuning-mysql-server-at-linux/" rel="bookmark" title="2009/05/10">性能调优：MySql Server at Linux</a></li></ul><p></p><p><a href="http://www.bshare.cn/share?url=http%3A%2F%2Flazing.ave7.net%2F2009%2Fapache-went-on-to-say-that-the-optimization%2F&title=%E7%BB%A7%E7%BB%AD%E8%AF%B4Apache%E7%9A%84%E4%BC%98%E5%8C%96" title="用bShare分享或收藏本文"><img src="http://static.bshare.cn/frame/images/button_custom1-zh.gif" alt="用bShare分享或收藏本文" /></a></p><br /><div><img src="http://lazing.ave7.net/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /> <img src="http://lazing.ave7.net/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=473" width="1" height="1" style="display: none;" />]]></content:encoded> <wfw:commentRss>http://lazing.ave7.net/2009/apache-went-on-to-say-that-the-optimization/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license> </item> </channel> </rss>
