VPS侦探论坛

 找回密码
 注册
查看: 8684|回复: 6

discuzx.conf 指定BBS 目录

[复制链接]
发表于 2010-12-17 22:14:58 | 显示全部楼层 |阅读模式

  1. rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
  2. rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
  3. rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
  4. rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
  5. rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
  6. rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
  7. rewrite ^([^\.]*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
  8. if (!-e $request_filename) {
  9. return 404;
  10. }[/
复制代码









这是 discuzx.conf 的伪静态配置


我的BBS装在子目录里 /BBS/   该如何修改这个配置文件啊?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-12-17 22:55:36 | 显示全部楼层
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2010-12-20 17:17:43 | 显示全部楼层

  1. location /bbs/ {

  2. rewrite ^([^\.]*)/bbs/topic-(.+)\.html$ $1/bbs/portal.php?mod=topic&topic=$2 last;
  3. rewrite ^([^\.]*)/bbs/article-([0-9]+)-([0-9]+)\.html$ $1/bbs/portal.php?mod=view&aid=$2&page=$3 last;
  4. rewrite ^([^\.]*)/bbs/forum-(\w+)-([0-9]+)\.html$ $1/bbs/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
  5. rewrite ^([^\.]*)/bbs/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/bbs/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;
  6. rewrite ^([^\.]*)/bbs/group-([0-9]+)-([0-9]+)\.html$ $1/bbs/forum.php?mod=group&fid=$2&page=$3 last;
  7. rewrite ^([^\.]*)/bbs/space-(username|uid)-(.+)\.html$ $1/bbs/home.php?mod=space&$2=$3 last;
  8. rewrite ^([^\.]*)/bbs/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
  9. if (!-e $request_filename)
  10.         return 404;{
  11. }
复制代码



报错信息

[root@li220-212 www]# /usr/local/nginx/sbin/nginx -t
[emerg]: directive "if" has no opening "{" in /usr/local/nginx/conf/discuzx.conf:10
configuration file /usr/local/nginx/conf/nginx.conf test failed



请教哪里出错了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2010-12-20 17:18:16 | 显示全部楼层



这是  discuzx.conf
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2010-12-20 17:21:14 | 显示全部楼层

回复 3# 的帖子


if (!-e $request_filename) {
        return 404;
}

都已经提示了,括号位置放错了

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2010-12-28 23:25:22 | 显示全部楼层

[root@li220-212 blog]# /usr/local/nginx/sbin/nginx -s reload
[emerg]: open() "/usr/local/nginx/conf/wp_blog.conf" failed (2: No such file or directory) in /usr/local/nginx/conf/vhost/www.keepfun.org.conf:9


这个错误代表了什么啊,军哥
发表于 2010-12-29 09:26:54 | 显示全部楼层

回复 6# 的帖子


/usr/local/nginx/conf/wp_blog.conf  这个文件不存在
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-17 03:03 , Processed in 0.026584 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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