Nginx环境下supesite discuz wordpress静态化

前段时间购买了MediaTemple 的GS的主机,用的是大猫的优惠码,价格为160USD,用了几天时间发现问题多多,不是提示我内存超出限制就是连接被重置,无法正常使用,无奈,弃之……..

后来购买了跟showfom小朋友同一家的的美国VPS主机,用起来感觉不错,随机赠送2个独立IP.

在VPS上装的是口碑较好的 ,即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.上次看完《建国大业》生病高烧一直到现在才好些,发烧必须到北京指定医院就诊,还要验血,还好,验完之后,一切正常!顺利回家,哈哈……

57 Responses to “Nginx环境下supesite discuz wordpress静态化”

  1. CHINA Mozilla Firefox Windows says:

    文章 不错 !

    [Reply]

  2. [...] Nginx环境下supesite discuz wordpress静态化 [...]

  3. ptubuntu CHINA Internet Explorer Windows says:

    不错。比我强多了。我是跟别人合的一年才100多呢。哈。。

    [Reply]

    久酷 CHINA Mozilla Firefox Windows Reply:

    @ptubuntu, 不会吧?这么便宜?

    [Reply]

  4. 蓝冰 CHINA Internet Explorer Windows says:

    很快,很爽~!

    [Reply]

  5. Showfom CHINA Mozilla Firefox Windows says:

    郁闷 我的WP Super Cache 貌似评论者的评论不会显示 只有更新缓存以后才显示 旧裤你是怎么设置的?告诉我一下

    [Reply]

    久酷 CHINA Mozilla Firefox Windows Reply:

    @Showfom, 这里看下http://www.jiucool.com/wp-super-cache-nginx/

    [Reply]

  6. 少爷 CHINA Mozilla Firefox Windows says:

    突然想起一个问题:为什么不架设LAMP?毕竟LAMP是WP的王道啊。

    [Reply]

    久酷 CHINA Mozilla Firefox Windows Reply:

    @少爷, NGINX更轻量级,相同条件下可以处理更多的并发连接 请求 数..表现更好的性能^_^ :lol: :lol:

    [Reply]

    少爷 CHINA Mozilla Firefox Windows Reply:

    @久酷, N更轻量级我是知道的,但是对于它的性能我持保留态度:如果真的这么优秀,为什么竞争不过A呢?当然,如果他的用户数量和FF的增长曲线相似则另当别论。

    [Reply]

    久酷 CHINA Mozilla Firefox Windows Reply:

    @少爷, 因为N出来的较晚,如果同时研发出来 谁领先那可就不一定啦 :lol: :lol:

Leave a Reply

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!:


正在读取数据……