You're almost as happy as you think you are.
Archive for December, 2009
wordpress采用wp super cache插件结合nginx的rewrite提升访问速度
Dec 26th
wordpress采用wp super cache插件结合nginx的rewrite提升访问速度,改写代码如下:
location /blog/ {
# enable search for precompressed files ending in .gz
# nginx needs to be complied using –-with-http_gzip_static_module
# for this to work, comment out if using nginx from aptitude
gzip_static on;
# if the requested file exists, return it immediately
if (-f $request_filename) {
break;
}
set $supercache_file '';
set $supercache_uri $request_uri;
if ($request_method = POST) {
set $supercache_uri '';
}
# Using pretty permalinks, so bypass the cache for any query string
if ($query_string) {
set $supercache_uri '';
}
if ($http_cookie ~* "comment_author_|wordpress|wp-postpass_" ) {
set $supercache_uri '';
}
# if we haven't bypassed the cache, specify our supercache file
if ($supercache_uri ~ ^(.+)$) {
set $supercache_file /blog/wp-content/cache/supercache/$http_host/$1index.html;
}
# only rewrite to the supercache file if it actually exists
if (-f $document_root$supercache_file) {
rewrite ^(.*)$ $supercache_file break;
}
# all other requests go to WordPress
if (!-e $request_filename) {
rewrite . /blog/index.php last;
}
}
杯具了,www.alexa.com全球排名网站被和谐
Dec 26th
最新消息,www.alexa.com全球排名网站被和谐,大家通过正常浏览已经无法访问这个排名网站,不过通过代理可以访问,很显然,该网站也被光荣的和谐了,悲哉,杯具乎。
最新消息,已解封,并推出了cn.alexa.com中国站。
CentOS 5.4+nginx上php5.2.9通过XCache加速
Dec 26th
Step # 1: Download xcahce source code
Use wget command to download latest stable release:
# cd /opt
# wget http://xcache.lighttpd.net/pub/Releases/1.2.1/xcache-1.2.1.tar.gz
Step # 2: Untar tar ball
Use tar command:
# tar -zxvf xcache-1.2.1.tar.gz More >
# cd xcache-1.2.1
Nginx 0.7.x + PHP 5.2.6(FastCGI)+ MySQL 5.1 在小内存VPS服务器上的配置优化[转载]
Dec 26th
VPS(全称Virtual Private Server)是利用最新虚拟化技术在一台物理服务器上创建多个相互隔离的虚拟私有主机。它们以最大化的效率共享硬件、软件许可证以及管理资源。对其用户 和应用程序来讲,每一个VPS平台的运行和管理都与一台独立主机完全相同,因为每一个VPS均可独立进行重启并拥有自己的root访问权限、用户、IP地 址、内存、过程、文件、应用程序、系统函数库以及配置文件。
VPS服务器最重要的指标就是内存大小,多个VPS服务器可以共享一颗CPU,但不能共享同一块内存。内存越大,价格越贵。
下面,以我的博客所在的VPS为例,介绍在128M内存下对 Nginx 0.7.x + PHP 5.2.6(FastCGI)+ MySQL 5.1 的优化。 More >
CentOS 5 服务器 Nginx 环境502 bad gateway问题解决方案
Dec 24th
<code><value name=”pm”>
<value name=”style”>static</value>
<value name=”max_children”>3</value>
<value name=”apache_like”>
<value name=”StartServers”>20</value>
<value name=”MinSpareServers”>5</value>
<value name=”MaxSpareServers”>35</value>
</value>
</value>
<value name=”request_terminate_timeout”>0s</value>
<value name=”request_slowlog_timeout”>0s</value>
<value name=”slowlog”>logs/slow.log</value>
<value name=”rlimit_files”>1024</value>
<value name=”rlimit_core”>0</value>
<value name=”chroot”></value>
<value name=”chdir”></value>
<value name=”catch_workers_output”>yes</value>
<value name=”max_requests”>500</value>
</code>
最新购买了一个VPS,使用感受
Dec 23rd
最近苦于备份数据搞得焦头烂额,遂决定购买了一个VPS,配置如下:至强四核芯片组、384M内存、10G空间+10G备份、一个独立IP地址、100M共享带宽、每月无限流量、64位CentOS 5.4,晚上在LINUX高手同事的配合下轻松搞定了命令行配置的过程,速度很流畅,而且使用感觉完全不同,期间学到了好几个新的命令记录与此:
一:升级CentOS默认的PHP5.1.6到PHP5.2.9命令如下:
Install the testing repository’s GPG key:
rpm --import http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
And download the CentOS-Testing repo file:
cd /etc/yum.repos.d wget http://dev.centos.org/centos/5/CentOS-Testing.repo
Now you can install/update to PHP 5.2.6 by running
yum --disablerepo=* --enablerepo=c5-testing update php
二:在知道了另一个虚拟主机FTP的情况下,下载该虚拟主机上的压缩包到这台VPS上的快捷方式是使用lftp,命令格式很简单:
lftp
open 122.225.*.*
login username
Password: *******
三:CentOS里边安装软件命令为:yum install 如果不知道该软件是否存在可以先使用:yum search softwarename 来先进行搜索。
四:mount -t vboxsf Public /home/andrius/Public需要替换成: mount.vboxsf Public /home/andrius/Public.
五:利用phpmyadmin新建mysql用户:
GRANT ALL ON *.* TO 'eastdesign'@'localhost' IDENTIFIED BY '123456';
六:chmod 644 * -R
find . -type d -exec chmod 755 -R {} \;
七:赋予所属权限:
chown directoryname:directoryname * -R
东方设计工作室公告:广东全面封网查备案,网站暂时中断访问
Dec 21st
接网络接入商最新消息,为了配合此次网络严打,广东电信积极响应号召全省在不做任何通知的情况下断网配合检查,恢复时间未定,这就是有中国特色的互联网,今天让你开着是给你面子,哪天不高兴了全部回收,想起几年前,CNNIC促销CN域名的时候是一副怎么样的嘴脸,等CN域名用户达到了1300万的时候再来一个全盘封停回收,也就是说这个是国家的,国家说回收就回收,个人站长算什么连个屁民都不如,等着回家种红薯去吧,这就是天朝,无奈而令人失望的天朝。
热烈庆祝中国功夫秒杀泰拳
Dec 19th
中国功夫终于不孚众望秒杀了泰拳,也让中国人真正的出了一口气,一直以来为中国功夫而痴迷,为生为中国人而自豪,跟小时候以来的功夫情节有着很大的关系,相信每一位中国人都是从小在黄飞鸿、李小龙、成龙、李连杰等武林高手的影视剧中慢慢长大,对中国功夫寄语了无比期望和崇敬,容不得他人任何的挑衅和侮辱,而泰拳竟然宣称可以秒杀中国功夫,尽管这些话很可能是赛事主办者为了炒作这场赛事而放出来的,但中国目前的社会形势太需要某些振奋人心的事情来刺激一下,而中国功夫秒杀泰拳扬中华之国威无疑是最好的一种兴奋剂,我承认当看到少林弟子张开印秒杀泰拳蓝桑坤的时候,我热血沸腾,太久没有这么激动了,为自己是一个中国人而自豪,为生在这个国度而骄傲。