Bigcar 发表于 2012-5-12 09:01:17

nginx下,discuz论坛安装在wordpress子目录下的静态规则

www.njdzpk.com      (wordpress)
www.njdzpk.com/bbs (dz7.2)


请问军哥该配置哪个文件呢,默认的usr\local\nginx\conf\vhost\www.njdzpk.com.conf的内容如下server
      {
                listen       80;
                server_name www.njdzpk.com njdzpk.com;
                index index.html index.htm index.php default.html default.htm default.php;
                root/home/wwwroot/www.njdzpk.com;

                location / {
                        try_files $uri @apache;
                        }

                location @apache {
                        internal;
                        proxy_pass http://127.0.0.1:88;
                        include proxy.conf;
                        }

                location ~ .*\.(php|php5)?$
                        {
                              proxy_pass http://127.0.0.1:88;
                              include proxy.conf;
                        }

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

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

                access_log off;
      }这里是DZ7.2的伪静态 但是我该加到什么位置呢?rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
rewrite ^/forum-(+)-(+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/thread-(+)-(+)-(+)\.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;

[ 本帖最后由 Bigcar 于 2012-5-12 09:09 编辑 ]

licess 发表于 2012-5-12 09:12:09

看虚拟机配置文件是lnmpa,需要用apache的伪静态格式,apache下用.htaccess
放网站目录下

Bigcar 发表于 2012-5-12 09:23:06

可以了,谢谢军哥

ocoolb 发表于 2012-5-31 13:54:20

这个怎么弄的 求规则。。

我是要在wordpress的根目录在安装一个wordpress
页: [1]
查看完整版本: nginx下,discuz论坛安装在wordpress子目录下的静态规则