Nginx配置location跳转后偶尔出现404
tv.xxx.com/voice请求时需跳转至:tv.xxx.com/zongyi/zt2015/haoshengyin/index.shtml
目录结构:

nginx服务器配置:
location ~ /voice {
rewrite /voice /zongyi/zt2015/haoshengyin/index.shtml last;
}
这样当访问tv.xxx.com/voice时,能跳转到/zongyi/zt2015/haoshengyin/index.shtml。
但这样有一个问题,偶尔会出现404.
查看日志:
显示,xxx/www/www/voice 文件夹不存在。
建立了一个空的voice目录后,不在报404错误了。具体原因不明??
Nginx配置location跳转后偶尔出现404的更多相关文章
- rewrite规则写法及nginx配置location总结
rewrite只能放在server{},location{},if{}中,并且只能对域名后边的除去传递的参数外的字符串起作用. 例如http://seanlook.com/a/we/index.php ...
- Nginx配置location及rewrite规则
Nginx配置location及rewrite规则 示例: location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ] } loca ...
- nginx配置location总结及rewrite规则写法【转】
转自 nginx配置location总结及rewrite规则写法 | Sean's Noteshttp://seanlook.com/2015/05/17/nginx-location-rewrite ...
- Nginx配置location总结及rewrite规则写法
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 32.0px "Helvetica Neue"; color: #323333 } p. ...
- 转:Nginx 配置 location 总结及 rewrite 规则写法
转: http://www.linuxidc.com/Linux/2015-06/119398.htm 1. location正则写法 一个示例: location =/{ # 精确匹配 / ,主机名 ...
- 【转】nginx配置location总结及rewrite规则写法
原文:http://seanlook.com/2015/05/17/nginx-location-rewrite/ 1. location正则写法 location = / { # 精确匹配 / ,主 ...
- nginx配置 location及rewrite规则详解
1. location正则写法 语法规则: location [=|~|~*|^~] /uri/ { … } = 开头表示精确匹配 ^~ 开头表示uri以某个常规字符串开头,理解为匹配 url ...
- nginx配置location总结及rewrite规则写法(转)
一个示例: location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ] } location / { # 因为所有的地址都以 / 开头,所以这 ...
- nginx配置location总结及rewrite规则写法 (若配置reload或restart不生效就stop start)
location正则写法 一个示例: location = / { # 精确匹配 / ,主机名后面不能带任何字符串 [ configuration A ] } location / { # 因为所有的 ...
随机推荐
- oracle11g配置dataguard
DATAGUARD是通过建立一个PRIMARY和STANDBY组来确立其参照关系. STANDBY一旦创建,DATAGUARD就会通过将主数据库(PRIMARY)的REDO传递给STAND ...
- js 中导出excel 较长数字串会变成科学计数法(转载)
在做项目中,碰到如题的问题.比如要将居民的信息导出到excel中,居民的身份证号码因为长度过长(大于10位),excel会自动的将过长的数字串转换成 科学计数法.现在网上找到解决方案之一: (在数字串 ...
- LeetCode 笔记系列四 Remove Nth Node From End of List
题目:Given a linked list, remove the nth node from the end of list and return its head.For example, Gi ...
- Sublime Text 配置成 C++ IDE
在Windows中将Sublime Text配置成C++的IDE.首先,为了运行C++需要安装g++编译器,g++可直接在codeblocks中找到.codeblock的官网下载地址是http://w ...
- 如何使用 libtorch 实现 LeNet 网络?
如何使用 libtorch 实现 LeNet 网络? LeNet 网络论文地址: http://yann.lecun.com/exdb/publis/pdf/lecun-01a.pdf
- mysql删除重复数据,保留最新的那一条
因为数据库没键外键,在关联查询的时候,会碰到查询条数多余数据库实际条数,这因为关联字段在表中有重复值而导致的. 解决方案: 1.数据库脚本删除重复数据,保留最新的一条 2.对关联字段增加唯一约束 例如 ...
- 0603-Zuul构建API Gateway-通过Zuul上传文件,禁用Zuul的Filter
一.通过Zuul上传文件 参看地址:https://cloud.spring.io/spring-cloud-static/Edgware.SR3/single/spring-cloud.html#_ ...
- 4.ubuntu实现linux与windows的互相复制与粘贴
为了能够在linux和windows之间直接进行互相复制粘贴,给出下面的解决办法. 系统环境: ubuntu12.04(linux), win7系统 以下指令都是在超级用户的执行权限下执行的. 要解决 ...
- GC的性能指标和内存容量配置原则
一.GC性能指标吞吐量:应用花在非GC上的时间百分比GC负荷:与吞吐量相反,指应用花在GC上的时间百分比暂停时间:应用花在GC stop-the-world的时间GC频率反应速度:从一个对象变成垃圾到 ...
- 记ambari启用kerberos添加kafka组件后yarn和hive出现Failure unspecified at GSS-API level (Mechanism level: Checksum failed)--403错误
出现警告的过程是: 1.搭建ambari集群成功后,添加了hdfs和zk组件,然后启用了kerberos: 2.kerberos启用完毕后添加hbase和yarn.MapReduce.hive都没有出 ...