0

在我的 VPS (digital ocean,centOS) 上运行 nginx 时出现问题

表明:

nginx: [emerg] unknown directive "[alert" in /usr/local/nginx/conf/wordpress.conf:14

wordpress.conf:

location / {
if (-f $request_filename/index.html){
                rewrite (.*) $1/index.html break;
        }
if (-f $request_filename/index.php){
                rewrite (.*) $1/index.php;
        }
if (!-f $request_filename){
                rewrite (.*) /index.php;
        }
}

[alert type="notice" close="true"]
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

[/alert]

问题是什么?

4

1 回答 1

0

解决了。删除

[alert type="notice" close="true"] rewrite /wp-admin$ $scheme://$host$uri/ permanent;

但我不知道为什么。

于 2014-10-29T14:27:22.503 回答