Configure Nginx to support playback in f4v video format
By default, Nginx does not support playback in f4v video format. The solution is to edit the mime. types file and add f4v to video/mp4.
Types {
# Data interchange
Application/atom + xml atom;
Application/json map topojson;
Application/ld + json jsonld;
Application/rss + xml rss;
Application/vnd. geo + json geojson;
Application/xml rdf xml;
# JavaScript
# Normalize to standard type.
# Https://tools.ietf.org/html/rfc4329#section-7.2
Application/javascript js;
# Manifest files
Application/manifest + json webmanifest;
Application/x-web-app-manifest + json webapp;
Text/cache-manifest appcache;
# Media files
Audio/midi mid midi kar;
Audio/mp4 aac f4a f4b m4a;
Audio/mpeg mp3;
Audio/ogg oga ogg opus;
Audio/x-realaudio ra;
Audio/x-wav;
Image/bmp;
Image/gif;
Image/jpeg jpg;
Image/png;
Image/svg + xml svg svgz;
Image/tiff tif tiff;
Image/vnd. wap. wbmp;
Image/webp;
Image/x-jng;
Video/3gpp 3gp 3gpp;
Video/mp4 f4p f4v m4v mp4;
Video/mpeg mpg;
Video/ogg ogv;
Video/quicktime mov;
Video/webm;
Video/x-flv;
Video/x-mng;
Video/x-ms-asf asx;
Video/x-ms-wmv;
Video/x-msvideo avi;
# Serving '. ico' image files with a different media type
# Prevents Internet Explorer from displaying then as images:
# Https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee
Image/x-icon cur ico;
# Microsoft Office
Application/msword doc;
Application/vnd. ms-excel xls;
Application/vnd. ms-powerpoint;
Application/vnd.openxmlformats-officedocument.wordprocessingml.doc ument docx;
Application/vnd. openxmlformats-officedocument.spreadsheetml.sheet xlsx;
Application/vnd. openxmlformats-officedocument.presentationml.presentation pp TX;
# Web fonts
Application/font-woff;
Application/font-woff2 woff2;
Application/vnd. ms-fontobject eot;
# Browsers usually ignore the font media types and simply sniff
# The bytes to figure out the font type.
# Https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern
#
# However, Blink and WebKit based browsers will show a warning
# In the console if the following font types are served with any
# Other media types.
Application/x-font-ttf ttc ttf;
Font/opentype otf;
# Other
Application/java-archive ear jar war;
Application/mac-binhex40 (hqx;
Application/octet-stream bin deb dll dmg exe img iso msi msm msp safariextz;
Application/pdf;
Application/postscript ai eps ps;
Application/rtf;
Application/vnd. google-earth.kml + xml kml;
Application/vnd. google-earth.kmz kmz;
Application/vnd. wap. wmlc;
Application/x-7z-compressed 7z;
Application/x-bb-appworld bbaw;
Application/x-bittorrent torrent;
Application/x-chrome-extension crx;
Application/x-cocoa cco;
Application/x-java-archive-diff jardiff;
Application/x-java-jnlp-file jnlp;
Application/x-makeself run;
Application/x-opera-extension oex;
Application/x-perl pl pm;
Application/x-pilot pdb prc;
Application/x-rar-compressed rar;
Application/x-RedHat-package-manager rpm;
Application/x-sea;
Application/x-shockwave-flash swf;
Application/x-stuffit sit;
Application/x-tcl tk;
Application/x-x509-ca-cert crt der pem;
Application/x-xpinstall xpi;
Application/xhtml + xml xhtml;
Application/xslt + xml xsl;
Application/zip;
Text/css;
Text/html htm html shtml;
Text/mathml mml;
Text/plain txt;
Text/vcard vcf;
Text/vnd. rim. location. xloc;
Text/vnd. sun. J2. app-descriptor jad;
Text/vnd. wap. wml;
Text/vtt;
Text/x-component htc;
}
For more Nginx tutorials, see the following:
Deployment of Nginx + MySQL + PHP in CentOS 6.2
Build a WEB server using Nginx
Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5
Performance Tuning for Nginx in CentOS 6.3
Configure Nginx to load the ngx_pagespeed module in CentOS 6.3
Install and configure Nginx + Pcre + php-fpm in CentOS 6.4
Nginx installation and configuration instructions
Nginx log filtering using ngx_log_if does not record specific logs
Nginx details: click here
Nginx: click here
This article permanently updates the link address: