nginx报错

[root@36349210-0fd7-4edd-8e8e-ada3cef21784 ~]# /usr/local/nginx/sbin/nginx -t
nginx: [emerg] directive "rewrite" is not terminated by ";" in /usr/local/nginx/conf/rewrite/bbs.conf:3
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

根据提示 找到/usr/local/nginx/conf/rewrite/bbs.conf

发现里面

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

有问题  使用 “”引号把他引起来修改后如下

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




你可能感兴趣的:(nginx,报错,forum)