侧边栏壁纸
博主头像
乌拉队长博主等级

你只管努力,其余的交给命运

  • 累计撰写 129 篇文章
  • 累计创建 34 个标签
  • 累计收到 34 条评论

目 录CONTENT

文章目录

Nginx: [emerg] directive "rewrite" is not terminated by ";"

乌拉队长
2021-08-22 / 0 评论 / 0 点赞 / 1,401 阅读 / 253 字

Nginx: [emerg] directive "rewrite" is not terminated by ";"

报错的意思是说rewrite应该以分号“;”结尾,但是没检测到分号。

这种情况大多是因为规则中存在{},从而nginx将 } 识别为规则结尾,造成报错, 此时可以使用双引号""把规则包起来可以避免这个错误

例如:

rewrite "^\/rny\/webface\/mailApps\/(.*)(\/\d{6,})(.*)$" /web/app/dev/$1
0

评论区