By Ivan Pushkin
I use nginx to stream video from server.
But i get error: net::ERR_CONTENT_LENGTH_MISMATCH in this case:
how can i fix this error?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi Ivan, <br> <br>If you could provide a little more information, we could probably help you better. Is this just static html with a video tag or are you using some kind dynamic framework? Also could you check the contents of your Nginx error log, most likely located at: <br> <br><pre> <br>/var/log/nginx/error.log <br></pre> <br> <br>I think that will probably show the real problem. Chances are it is a permissions issue. Is the video file accessible to the user running Nginx?
Additional information: <br>nginx vhost config: <br>server { <br> listen 80; <br> server_name media-server.com; <br> root /var/www/site; <br> index off; <br> access_log /var/log/nginx/media.access.log; <br> error_log /var/log/nginx/media.error.log; <br> <br> fastcgi_hide_header Set-Cookie; <br> expires max; <br> add_header Cache-Control public; <br> <br> location /video/ { <br> mp4; <br> root /var/www/site; <br> } <br>} <br> <br>error log files clean, no errors <br> <br>in access log, only successful requests: <br>ip - - [08/May/2014:18:04:58 +0300] “GET /video/shifts/8-9.mp4 HTTP/1.1” 304 0 “http://media-server.com/” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.132 Safari/537.36” <br>ip - - [08/May/2014:18:05:58 +0300] “GET /video/more/cleverclover.mp4 HTTP/1.1” 206 822075 “http://media-server.com/” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.132 Safari/537.36” <br> <br> <br>i get errors only in google chrome and opera browsers, in ff, safari, ie - video working good. <br> <br>i try use amazon s3, videos from amazon servers works fine, no errors. i compare headers from server - headers from my server same as amazon servers. <br> <br>i try this options: <br>1. disable gzip <br>2. set <br> keepalive_timeout 1200s; <br>3. set <br> proxy_http_version 1.1; <br> proxy_set_header Connection “”; <br> <br>but it makes no difference
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.