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 / { # 因为所有的 ...
随机推荐
- Spring MVC静态资源访问
最近在学习servlet的时候发现自己不能访问到css和js, 于是google一番学到不少方法加载,总结如下: 1.对于Spring MVC, 由于我们截获了所有请求<url-pattern& ...
- Javascript 香港身份证号校验
<!DOCTYPE html> <html> <head> <title>香港身份证校验码计算</title> </head> ...
- 2017 Multi-University Training Contest - Team 2——HDU6045&&HDU6047&&HDU6055
讲一下这场多校赛里面比较简单的三个题 HDU6045 Is Derek lying? 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6045 题意:有 ...
- The Personal Touch Client Identification 个性化接触 客户识别
w服务器要知道和谁在交谈. HTTP The Definitive Guide Web servers may talk to thousands of different clients simul ...
- react 将字符串解析为markdown
react 中有许多组件支持把字符串转化为markdown,并以html的形式展示出来.这里我试用了 react-markdown 和 hyperdown 两个库,发现hyperdown比较好,因为r ...
- Xception
Xception(Deep Learning with Depth-wise Separable convolutions)——google Inception-V3 Xception 并不是真正意义 ...
- Elven Postman---hdu5444(二叉树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5444 有一个序列,由这个序列可以画出一颗二叉树(每个节点的左边(W)都比它大,右边(E)都比它小), ...
- K-modes聚类算法MATLAB
K-modes算法主要用于分类数据,如 国籍,性别等特征. 距离使用汉明距离,即有多少对应特征不同则距离为几. 中心点计算为,选择众数作为中心点. 主要功能: 随机初始化聚类中心,计算聚类. 选择每次 ...
- birt 日志打印
在birt初始initialize 方法里,定义日志输出方法 importPackage(Packages.java.util.logging); importPackage(Packages.log ...
- mysql监控优化(一)连接数和缓存
一.mysql的连接数 MYSQL数据库安装完成后,默认最大连接数是100,一般流量稍微大一点的论坛或网站这个连接数是远远不够的,连接数少的话,在大并发下连接数会不够用,会有很多线程在等待其他连接释放 ...