<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Platform on 两点之间</title><link>https://yuehei.37net.com/category/platform/</link><description>Recent content in Platform on 两点之间</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><lastBuildDate>Thu, 21 Jul 2011 03:53:18 +0000</lastBuildDate><atom:link href="https://yuehei.37net.com/category/platform/index.xml" rel="self" type="application/rss+xml"/><item><title>FastDFS</title><link>https://yuehei.37net.com/2011/07/fastdfs/</link><pubDate>Thu, 21 Jul 2011 03:53:18 +0000</pubDate><guid>https://yuehei.37net.com/2011/07/fastdfs/</guid><description>&lt;p&gt;fastdfs是一个分布式的文件存储系统，&lt;/p&gt;
&lt;p&gt;项目主页：http://code.google.com/p/fastdfs/&lt;/p&gt;
&lt;p&gt;支持论坛：http://bbs.chinaunix.net/forum-240-1.html&lt;/p&gt;
&lt;p&gt;测试了一下，发现很好用，优点：&lt;/p&gt;
&lt;p&gt;1，简单：tracker做负载均衡，storage存储数据。&lt;/p&gt;
&lt;p&gt;2，良好的横行和纵向扩展：增加group即可实现容量扩充，增加group内的storage即可实现性能扩充&lt;/p&gt;
&lt;p&gt;3，节省成本：数据不分块存储，前端无须再加一层缓存，直接将storage当做web server来使用&lt;/p&gt;
&lt;p&gt;4，良好的灾备：不需要raid，group内的storage存储相同的数据&lt;/p&gt;
&lt;p&gt;5，持续的的更新，作者很用心&lt;/p&gt;
&lt;p&gt;配置文件：http://bbs.chinaunix.net/thread-1941456-1-1.html&lt;/p&gt;</description></item><item><title>nginx下wordpress的rewrite</title><link>https://yuehei.37net.com/2010/10/nginx_wordpress_rewrite/</link><pubDate>Fri, 08 Oct 2010 04:26:21 +0000</pubDate><guid>https://yuehei.37net.com/2010/10/nginx_wordpress_rewrite/</guid><description>&lt;p&gt;国庆前买了 &lt;a href="http://www.linode.com/" target="_blank" rel="nofollow" &gt;linode&lt;/a&gt; 的VPS，算是edong撤走了，不用再去照相了，照相这种备案方式和以前BBS专项备案一样，没有什么操作性，迟早也要取消的。以前用edong vps，跑的是nginx+apache，这次直接换成nginx+spawn-fcgi。&lt;/p&gt;
&lt;pre lang="apache"&gt;# BEGIN WordPress
&amp;lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
&amp;lt;/IfModule&gt;
# END WordPress
&lt;/pre&gt;
&lt;p&gt;上面是推荐的rewrite规则，但是这样规则会将不存在的图片,css等文件也都转发到index.php，这些文件应该报个404的。&lt;/p&gt;
&lt;pre lang="apache"&gt;#现在nginx上使用的rewrite
 server {
 server_name yuehei.37net.com;
 
 access_log /var/log/nginx/yuehei_37net_com_access.log main;
 error_log /var/log/nginx/yuehei_37net_com_error.log info;

 root /data/html/37net.com/yuehei;
 index index.html index.htm index.php;
 
 error_page 403 =200 /403.html;
 location = /403.html {
 root /data/html;
 }
 error_page 404 =200 /404.html;
 location = /404.html {
 root /data/html;
 }
 
 location / {
 if (!-e $request_filename) {
 rewrite ^(.*)$ /index.php last;
 break;
 }
 }

 location ~ \.(gif|jpg|jpeg|png|css|js)$ {
 expires 365d;
 }

 location ~ \.php$ {
 include /etc/nginx/fastcgi_params;
 }
 }
&lt;/pre&gt;
&lt;p&gt;测试一下: &lt;a class="link" href="https://yuehei.37net.com/test_test.png" target="_blank" rel="noopener"
 &gt;https://yuehei.37net.com/test_test.png&lt;/a&gt; 报的是404了&lt;/p&gt;</description></item><item><title>在vps主机配置awstats日志数据分析软件</title><link>https://yuehei.37net.com/2010/02/awstats/</link><pubDate>Thu, 11 Feb 2010 15:44:05 +0000</pubDate><guid>https://yuehei.37net.com/2010/02/awstats/</guid><description>&lt;p&gt;盘今的主机，是我用过最烂的，虽然客服很尽责，但是速度已经不能用慢来形容，ping可以ping，网页只是偶尔能打开。买了一下E动VPS，界面很方便，速度还不错，稳定性有待观察。&lt;/p&gt;
&lt;p&gt;我是按装这个&lt;a href="http://vps.15099.net/2008/12/configure-awstats-log-analyze-software-in-vps-hosting-183.html" target="_blank" rel="nofollow" &gt;【文档】&lt;/a&gt;来进行awstats日志的配置。有一些写的不详细：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;第（2）步我改成了虚拟主机&lt;/li&gt;
&lt;/ol&gt;
&lt;pre lang="apache"&gt;&amp;lt;VirtualHost *:80&gt;
 Alias /awstats/icon/ /var/www/awstats/icon/
 Alias /awstats/ /var/www/awstats/

 &amp;lt;Directory /var/www/awstats/&gt;
 DirectoryIndex index.html
 Options ExecCGI
 order deny,allow
 allow from all
 &amp;lt;/Directory&gt;
&amp;lt;/VirtualHost&gt;

&lt;/pre&gt;
&lt;p&gt;打开浏览器，如果看到是pl的源代码，在apache的配置文件中增加&lt;/p&gt;
&lt;pre lang="apache"&gt;AddHandler cgi-script .cgi .pl
&lt;/pre&gt;
&lt;ol start="2"&gt;
&lt;li&gt;如果显示的界面是英文，则在第（4）部中，将LANG=“auto&amp;quot; 改成 LANG=&amp;ldquo;cn&amp;rdquo;&lt;/li&gt;
&lt;/ol&gt;</description></item></channel></rss>