秀米云香港服务器

遭遇问题:directive“rewrite”isnotterminatedby“;”

用vi编辑器编辑完nginx.conf文件后生存,东京主机日本代理服务器,在shell下执行呼吁/usr/local/web/nginx/sbin/nginx-t用以查抄nginx.conf设置文件是否正确(假设nginx被编译到/usr/local/web/nginx/)正确的话:

[[email protected]]#/usr/local/web/nginx/sbin/nginx-ttheconfigurationfile/usr/local/web/nginx/conf/nginx.confsyntaxisokconfigurationfile/usr/local/web/nginx/conf/nginx.conftestissuccessful

假如呈现如下问题:directive“rewrite”isnotterminatedby“;”

[[email protected]]#/usr/local/web/nginx/sbin/nginx-t[emerg]:directive“rewrite”isnotterminatedby“;”in/usr/local/web/nginx/conf/nginx.conf:160configurationfile/usr/local/web/nginx/conf/nginx.conftestfailed

处理惩罚要领:将从头后的url用双引号引起来!

堕落:rewrite^/date/([0-9]{6})/?([0-9]+)?/?$/index.php?action=article&setdate=$1&page=$2last;正确:rewrite“^/date/([0-9]{6})/?([0-9]+)?/?$”/index.php?action=article&setdate=$1&page=$2last;

看着那句directive“rewrite”isnotterminatedby“;”还觉得是没;呢

标题:nginx 法则错误 directive “rewrite” is not terminated by

地址: https://www.yunhk.xyz/25901.html