全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 3201|回复: 8
打印 上一主题 下一主题

[疑问] centos+nginx 怎么弄 DZ7.2的伪静态

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-24 21:16:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
RT
2#
发表于 2010-1-24 21:17:52 | 只看该作者

回复 1# 的帖子

6.0.0的话我可以复制给你

Discuz 7.2的话就不清楚了。

nginx.conf 的server段里面加入。

Discuz6在nginx下的伪静态规则:http://fd.vvwvv.eu.org/thread-5576-1-1.html
3#
 楼主| 发表于 2010-1-24 21:21:45 | 只看该作者
这个适用7.2么 加到Server哪里?
结尾还是哪里
4#
发表于 2010-1-24 21:25:27 | 只看该作者

回复 3# 的帖子

是否适合Discuz 7.2我不清楚的,

比如一个discuz 6.0 伪静态成功的nginx server段,根目录放的论坛
server
        {
                listen       80;
                server_name www.test.com;
                index index.html index.htm index.php;
                root  /web/www;
                error_page 404 /404.html;
                #limit_conn   crawler  20;

                #location /status {
                #stub_status        on;
                #access_log        off;
                #}
                location / {
rewrite ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2 last;
rewrite ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3 last;
rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3 last;
rewrite ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro.php?$2=$3 last;
rewrite ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3 last;
rewrite ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2 last;
}
                location ~ .*\.(php|php5)?$
                        {
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                #fastcgi_pass  127.0.0.1:9000;
                                fastcgi_index index.php;
                                include fcgi.conf;
                                fastcgi_intercept_errors on;
                        }

                location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }

                location ~ .*\.(js|css)?$
                        {
                                expires      12h;
                        }

                log_format  test  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $http_x_forwarded_for';
                access_log  /web/logs/access.log  access;
        }
5#
发表于 2010-1-24 21:52:30 | 只看该作者
6和7.2通用的应该是
6#
发表于 2010-1-24 21:53:07 | 只看该作者

回复 5# 的帖子

哦,那楼主可以去试试我给的。
7#
发表于 2010-1-24 21:56:33 | 只看该作者
当然,你可以先运行/etc/init.d/iptables stop
先看看能不能连上
8#
 楼主| 发表于 2010-1-24 22:47:01 | 只看该作者
好了  首页可以静态么
9#
发表于 2010-1-24 22:56:48 | 只看该作者

回复 8# 的帖子

首页不是index.php嘛,这个你还要静态呀   不行的呢。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-9 06:02 , Processed in 0.070498 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表