老师,跟着您的课程我部署好项目之后,网站可以打开,但是视频无法播放,请问是什么问题呢?
来源:12-3 .部署微电影网站
Noob3242256
2017-12-10
项目:
nginx.conf文件:
worker_processes 2;
events {
worker_connections 262140;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
limit_conn_zone $binary_remote_addr zone=addr:5m;
upstream mooc {
server 127.0.0.1:5001;
server 127.0.0.1:5002;
}
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
proxy_pass http://mooc;
}
location ~ \.flv$ {
flv;
limit_conn addr 4;
limit_rate 1024k;
rewrite ^/static/uploads/(.+?).flv$ /mooc_project/app/static/uploads/$1.flv permanent;
}
location ~ \.mp4$ {
mp4;
limit_conn addr 4;
limit_rate 1024k;
rewrite ^/static/uploads/(.+?).mp4$ /mooc_project/app/static/uploads/$1.mp4 permanent;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
另外通过后台添加一个1.9M的视频时会提示:413 Request Entity Too Large。
2回答
-
Brooklyn_1
2018-04-24
我想请教下是如何解决的呢?
00 -
Noob3242256
提问者
2017-12-12
已解决。可以调整nginx配置。
00
相似问题