a21768541
2019-10-16 18:32
采纳率: 50%
浏览 496
已采纳

Nginx无法访问tomcat下面的视频文件

通过Nginx配置转发。无法访问tomcat下面的视频文件。其它资源文件都没有问题

server 
{ 
    listen 80 ; 
    server_name abc.test.com;
    keepalive_timeout 120; 
    keepalive_requests 20000; 
    location / { 
        proxy_http_version 1.1; 
        proxy_set_header Host $host; 
        proxy_set_header X-Real-IP $remote_addr; 
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
        proxy_set_header Connection ""; 
        proxy_pass http://127.xxx; 
    } 

} 

直接访问,http://abc.test.com/core/images/media/20190912/20190912172014_4.mp4
页面出现404错误,但是访问图片又可以正常出来。
查看nginx日志:
2019/10/16 17:42:27 [error] 28375#0: *663727 open() "/usr/local/nginx/html/core/images/media/20190920/20190920223607_535.mp4" failed (2: No such file or directory), client: 59.41.23.107, server: abc.q test.com"GET /ejcore/ages/media/20190920/20190920223607_535.mp4 HTTP/1.1", host:

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题