VPS侦探论坛

 找回密码
 注册
查看: 5700|回复: 3

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

[复制链接]
发表于 2012-5-12 09:01:17 | 显示全部楼层 |阅读模式

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


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

  7.                 location / {
  8.                         try_files $uri @apache;
  9.                         }

  10.                 location @apache {
  11.                         internal;
  12.                         proxy_pass http://127.0.0.1:88;
  13.                         include proxy.conf;
  14.                         }

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

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

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

  28.                 access_log off;
  29.         }
复制代码
这里是DZ7.2的伪静态 但是我该加到什么位置呢?
  1. rewrite ^/archiver/((fid|tid)-[\w\-]+\.html)$ /archiver/index.php?$1 last;
  2. rewrite ^/forum-([0-9]+)-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2 last;
  3. rewrite ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
  4. rewrite ^/space-(username|uid)-(.+)\.html$ /space.php?$1=$2 last;rewrite ^/tag-(.+)\.html$ /tag.php?name=$1 last;
复制代码

[ 本帖最后由 Bigcar 于 2012-5-12 09:09 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-5-12 09:12:09 | 显示全部楼层


看虚拟机配置文件是lnmpa,需要用apache的伪静态格式,apache下用.htaccess
放网站目录下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-5-12 09:23:06 | 显示全部楼层

可以了,谢谢军哥
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-5-31 13:54:20 | 显示全部楼层



这个怎么弄的 求规则。。

我是要在wordpress的根目录在安装一个wordpress
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 03:19 , Processed in 0.026147 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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