对于下面的重写规则

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. java多线程之:Java中的ReentrantLock和synchronized两种锁定机制的对比 (转载)

    原文:http://www.ibm.com/developerworks/cn/java/j-jtp10264/index.html 多线程和并发性并不是什么新内容,但是 Java 语言设计中的创新之 ...

  2. 恢复Ext3下被删除的文件(转)

    恢复Ext3下被删除的文件(转) 前言 下面是这个教程将教你如何在Ext3的文件系统中恢复被rm掉的文件. 删除文件 假设我们有一个文件名叫 ‘test.txt’ $ls -il test.txt 1 ...

  3. 【转】IOS图像拉伸解决方案

    原文网址:http://www.cnblogs.com/ios8/p/ios-pic-lashen.html UIButton实现背景拉伸,即图片两端不拉伸中间拉伸的办法有如下两种: 第一种方法很简单 ...

  4. Nginx-SSI

    <a href="<!--#include file="/$SERVER_NAME.shtml"-->">点击</a> a

  5. docker学习3-虚拟网络模式

    一.虚拟机网络模式 在理解docker网络隔离前,先看下之前虚拟机里对网络的处理,VirtualBox中有4中网络连接方式: NAT Bridged Adapter Internal Host-onl ...

  6. 拿什么来拯救你,我的table

    分类: Html/CSS | 转载请注明: 出自 海玉的博客 本文地址: http://www.hicss.net/how-to-save-you-my-table/ table曾经在网页开发中占据着 ...

  7. 在svg里面画虚线

    使用stroke-dasharray="3 2"  属性,其中3和2分别表示画的长度和间隙的长度 比如 <line x1="0" y1="5&q ...

  8. JavaScript中“javascript:void(0) ”是什么意思

    来源: <a href="javascript:test();void(0);">here</a> 此处:Javascript中void是一个操作符,该操作 ...

  9. mac安装IE浏览器

    1.首先得下载一个WineBottler for mac. 2.下载完毕之后,打开dmg文件后将WineBottler Combo里面的Wine和WineBottler这两个程序拖拉进应用程序. 3. ...

  10. Hadoop常见错误解决

    1. 通过命令和查看日志文件查看hadoop启动和运行情况 在NameNode端,可以通过 tail -100 /var/log/hadoop/hadoop/hadoop-hadoop-namenod ...