前段时间购买了MediaTemple 的GS的主机,用的是大猫的优惠码,价格为160USD,用了几天时间发现问题多多,不是提示我内存超出限制就是连接被重置,无法正常使用,无奈,弃之……..
后来购买了跟showfom小朋友同一家的的美国VPS主机,用起来感觉不错,随机赠送2个独立IP.
在VPS上装的是口碑较好的 nginx,即LNMP. 但nginx下静态化规则与apache不同,需要重新配置,我目前用到的几款程序的静态化规则如下:wordpress 、supesite、discuz,nginx下静态化规则 ctrl+c +v following
//supesite nginx 静态化规则
rewrite ^/([0-9]+)/spacelist(.+)$ /index.php?uid/$1/action/spacelist/type$2 last;
rewrite ^/([0-9]+)/viewspace(.+)$ /index.php?uid/$1/action/viewspace/itemid$2 last;
rewrite ^/([0-9]+)/viewbbs(.+)$ /index.php?uid/$1/action/viewbbs/tid$2 last;
rewrite ^/([0-9]+)/(.*)$ /index.php?uid/$1/$2 last;
rewrite ^/([0-9]+)$ /index.php?uid/$1 last;
rewrite ^/action(.+)$ /index.php?action$1 last;
rewrite ^/category(.+)$ /index.php?action/category/catid$1 last;
rewrite ^/viewnews(.+)$ /index.php?action/viewnews/itemid$1 last;
rewrite ^/viewthread(.+)$ /index.php?action/viewthread/tid$1 last;
rewrite ^/mygroup(.+)$ /index.php?action/mygroup/gid$1 last;
//discuz nginx 静态化规则
rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;
rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
break;
//wordpress nginx 静态化规则
location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
现在本博客于一小时前也已经搬迁到此款VPS上来了,大家感觉下速度如何?
PS.上次看完《建国大业》生病高烧一直到现在才好些,发烧必须到北京指定医院就诊,还要验血,还好,验完之后,一切正常!顺利回家,哈哈……
rewrite不兼容确实很麻烦
上回为了写一个规则弄了一整天
[Reply]
久酷
Reply:
September 25th, 2009 at 10:26
@kangzj, 这东西写起来非常麻烦 ……..都是些符号,错一个也不行.
[Reply]
还好你没事,现在检查都是自费的吧?
[Reply]
久酷
Reply:
September 25th, 2009 at 10:24
@卢松松, 嗯,是自费的哇……一次要四百多啊.
[Reply]
WordPress 不用那么麻烦的 一行就可以 囧
[Reply]
久酷
Reply:
September 25th, 2009 at 10:24
@Showfom, 啥代码?发来学习学习…….
[Reply]
Showfom
Reply:
September 25th, 2009 at 10:27
@久酷, http://zou.lu/wordpress-permalink/
[Reply]
久酷
Reply:
September 25th, 2009 at 10:31
@Showfom, 数了一下,一共是五行……..哈哈
Showfom
Reply:
September 25th, 2009 at 10:33
@久酷, 可以连起来写一行 哈哈
”加载时间0.486 秒“供久酷参考
[Reply]
久酷
Reply:
September 25th, 2009 at 09:19
@胡一刀,
收到
[Reply]
为什么我打开的时候很慢,绿色的主题,蛮清爽的
[Reply]
久酷
Reply:
September 25th, 2009 at 09:09
@sleepy, 奇怪,的确,有时快,有时慢,刚碰到慢的了,正在研究
[Reply]
没说啥主机?价格?
呵呵。我感兴趣
[Reply]
久酷
Reply:
September 25th, 2009 at 08:14
@Lc., http://www.photonvps.com 价格在网站标明着
几十G空间,几百至TB级流量吧^_^
[Reply]
已经不能再快了
[Reply]
久酷
Reply:
September 25th, 2009 at 08:12
@万戈, 哈哈,只要不比以前慢就好了
[Reply]
深夜别整了,会更严重的!
[Reply]
久酷
Reply:
September 25th, 2009 at 08:19
@会律博客, 一好点就想折腾
[Reply]
靠,沙发没了。。
p.s : 你挺喜欢搬家的啊,呵呵。
[Reply]
久酷
Reply:
September 25th, 2009 at 08:19
@T, 有好的就想搬啊.
[Reply]
哇一一,抢个沙发做起。你满屏的Warning噢
[Reply]
久酷
Reply:
September 25th, 2009 at 00:15
@MuMu‘S, 哈哈……刚我也发现了,刚在配置服务器……..现在应该没问题了吧?
[Reply]
MuMu‘S
Reply:
September 25th, 2009 at 00:20
@久酷, 现在好了。你的页面看起清爽就是舒服。
[Reply]
whisperer
Reply:
September 25th, 2009 at 02:33
插入~~~
[Reply]