linux平台下nginx环境,安装discuz X3.2,怎么设置伪静态?求大神指点

自己已经安装好了,其他也都设置了,但是伪静态按照官方给的,但是还是无法实现伪静态,打开就是404状态。有木有大神给个详细的设置步骤!谢谢

Discuz X:
在 nginx下的配置文件nginx.conf添加

location / {
rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last;
rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last;
rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;

rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$
$1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3
last;
rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last;
rewrite ^([^\.]*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last;
if (!-e $request_filename) {
return 404;
}
}
正则表达式可以用相应的版本在后台伪静态设置里获取apache追问

用的是主机宝控制面板,但是现在找不到这个“nginx.conf”文件啊!

温馨提示:答案为网友推荐,仅供参考
相似回答