对于下面的重写规则

rewrite ^/gongying/([\d]{8})_([\d]+).html$ /index.php?app=support&act=view&pts=$1&support_id=$2 last;

始终报: nginx: [emerg] directive "rewrite" is not terminated by ";"   

测到最后发现原来是{}惹的祸,用引号引起来就没问题了

nginx重写规则报nginx: [emerg] directive "rewrite" is not terminated by ";"的更多相关文章

  1. [Linux] 解决nginx: [emerg] directive "rewrite" is not terminated by ";"

    解决nginx: [emerg] directive "rewrite" is not terminated by ";"nginx的rewite规则有时候没注 ...

  2. Nginx运行报错unknown directive ""

    使用文本编辑器把编码格式修改为UTF-8即可. 推荐文本编辑器:notepad++,自行百度搜索即可下载

  3. nginx集群报错“upstream”directive is not allow here 错误

    nginx集群报错“upstream”directive is not allow here 错误 搭建了一个服务器, 采用的是nginx + apache(多个) + php + mysql(两个) ...

  4. 配置 nginx server 出现nginx: [emerg] "root" directive is duplicate in /etc/nginx/server/blogs.conf:7

    在配置nginx 虚拟机时,执行 sudo /usr/sbin/nginx -t 报下面的错误: nginx: [emerg] nginx: configuration file /etc/nginx ...

  5. nginx: [emerg] directive "upstream" has no opening "{" in /application/nginx-1.6.3/conf/nginx.conf:13 ...

    修改nginx.conf配置文件时,报以下错误: [root@bqh-lb- nginx]# vim conf/nginx.conf [root@bqh-lb- nginx]# sbin/nginx ...

  6. 重启虚拟机后,再次重启nginx会报错:[emerg] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)

    问题: 重启虚拟机后,再次重启nginx会报错: open() "/var/run/nginx/nginx.pid" failed (2: No such file or dire ...

  7. nginx: [emerg] directive "location" has no opening "{" in /usr/local/nginx//conf/nginx.conf:75

    1.报错:[emerg]directive "location" has no opening "{" in ..... 解决方法: 由于对应行或者附近行的“{ ...

  8. Nginx 之四: Nginx服务器的rewrite、全局变量、重定向和防盗链相关功能

    一:Nginx 后端服务器组的配置: 1.upstream: 用于设置后端服务器组的主要指令,upstream类似于之前的server块或http块,用法如下: upstreame Myserver{ ...

  9. 基础知识之nginx重写规则

    nginx重写规则 nginx rewrite 正则表达式匹配 大小写匹配 ~ 为区分大小写匹配 ~* 为不区分大小写匹配 !~和!~*分别为区分大小写不匹配及不区分大小写不匹配 文件及目录匹配 -f ...

随机推荐

  1. 安卓应用运营知识:VersionCode和VersionName

    本文转载于:http://blog.sina.com.cn/s/blog_580a227a0101bdzb.html 小米应用商店运营了大概半年了,过程中有喜有泪,我们在运营过程中,发现有的运营和商务 ...

  2. 上传按钮样式优化 <input type="file" />

    <html><head><title>上传按钮样式优化</title> <style>.form-element-file-wapper { ...

  3. NDK环境搭建

  4. Python面向对象编程——引言

      1.类和实例:类是对象的定义,而实例是真正的事物.他存放了类中所定义的对象的具体信息 关键字是class,后面紧跟着一个类名,随后是定义类的雷替代码.通常有各种各样的定义和声明组成. class ...

  5. 关于a标签的target属性

    超级链接a的target属性已经是不被新规范支持了,其值有四个保留字: 1._blank      <a href="document.html" target=" ...

  6. Iaas-cloudstack2

    流程是下面的模板安装脚本,将对应的hypervisor模板下载下来并另存为临时文件,并解压缩,并将其移动到二级存储相应目录下,仅完成此工作. [root@manage nfs]# /usr/share ...

  7. P1001 第K极值【tyvj】

    /*========================================== P1001 第K极值 内存限制 128MB 代码限制 64KB 描述 Description 给定一个长度为N ...

  8. JavaScript:改变li前缀图片和样式

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stri ...

  9. java远程调试(断点)程序/tomcat( eclipse远程调试Tomcat方法)

    tomcat远程调试: 1.Linux中配置tomcat在catalina.sh中添加如下CATALINA_OPTS="-Xdebug  -Xrunjdwp:transport=dt_soc ...

  10. 程序员书单_J2EE专题

    Enterprise JavaBeans 3.0中文版(第5版) http://download.csdn.net/detail/shenzhq1980/9104015 J2EE设计模式 http:/ ...