VPS侦探论坛

标题: 请教nginx伪静态弄来弄去一直404 [打印本页]

作者: kkpgfgu    时间: 2011-3-31 18:53
标题: 请教nginx伪静态弄来弄去一直404
前天装的lnmp一键包,做了几个站,基本都是动态的,今天装了个站,开启伪静态,除了首页,其他页面都是404
404 Not Foundnginx/0.7.67
我说下我的步骤,高手们指点下哪里错了,我看了网上的一些教程首先我用sftp进入/usr/local/nginx/conf/vhost/ 目录下,找到我的 域名.conf文件,下载-编辑


打开域名.conf文件,该域名调用的伪静态规则文件是fcgi.conf于是下载fcgi.conf 文件编辑 在下面添加我的伪静态规则
location / {
rewrite "^(.*)sort_([0-9]+)_([0-9]+).html$" $1sort.php?sortid=$2&page=$3 last;rewrite "^(.*)over_([0-9]+).html$" $1over.php?page=$2 last;rewrite "^(.*)top_(.*)_([0-9]+).html$" $1top.php?topid=$2&page=$3 last;rewrite "^(.*)topover_(.*)_([0-9]+).html$" $1topover.php?topid=$2&page=$3 last;rewrite "^(.*)book_([0-9]+).html$" $1book.php?bookid=$2 last;rewrite "^(.*)down_(.*)_([0-9]+).html$" $1down.php?bookid=$3&type=$2 last;rewrite "^(.*)readend_([0-9]+).html$" $1readend.php?bookid=$2 last;rewrite "^(.*)read_([0-9]+)_([0-9]+).html$" $1read.php?cutid=$2&bookid=$3 last;rewrite "^(.*)chapter_([0-9]+)_([0-9]+)_([0-9]+).html$" $1chapter.php?cutid=$2&bookid=$3&chapterid=$4 last;};



添加后上传 /usr/local/nginx/sbin/nginx -s reload ssh输入指令,重启nginx 打开网站,伪静态页面仍然404
高手指点下!!
作者: licess    时间: 2011-3-31 19:12
标题: 回复 1# 的帖子
伪静态添加问题
请阅读http://lnmp.org/install.html
作者: kkpgfgu    时间: 2011-3-31 21:19
标题: 回复 2# 的帖子
悲剧了,我是添加域名后添加伪静态的




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4