阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

配置 Nginx 支持 f4v视频格式播放

206次阅读
没有评论

共计 4839 个字符,预计需要花费 13 分钟才能阅读完成。

Nginx 默认不支持 f4v 视频格式播放,解决方法为编辑 mime.types 文件,在 video/mp4 加上 f4v 即可

types {
 
  # Data interchange
 
    application/atom+xml                  atom;
    application/json                      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                          wav;
    image/bmp                            bmp;
    image/gif                            gif;
    image/jpeg                            jpeg jpg;
    image/png                            png;
    image/svg+xml                        svg svgz;
    image/tiff                            tif tiff;
    image/vnd.wap.wbmp                    wbmp;
    image/webp                            webp;
    image/x-jng                          jng;
    video/3gpp                            3gp 3gpp;
    video/mp4                            f4p f4v m4v mp4;
    video/mpeg                            mpeg mpg;
    video/ogg                            ogv;
    video/quicktime                      mov;
    video/webm                            webm;
    video/x-flv                          flv;
    video/x-mng                          mng;
    video/x-ms-asf                        asf asx;
    video/x-ms-wmv                        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                                              ppt;
    application/vnd.openxmlformats-officedocument.wordprocessingml.document    docx;
    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet          xlsx;
    application/vnd.openxmlformats-officedocument.presentationml.presentation  pptx;
 
 
  # Web fonts
 
    application/font-woff                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                      pdf;
    application/postscript                ai eps ps;
    application/rtf                      rtf;
    application/vnd.google-earth.kml+xml  kml;
    application/vnd.google-earth.kmz      kmz;
    application/vnd.wap.wmlc              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                    sea;
    application/x-shockwave-flash        swf;
    application/x-stuffit                sit;
    application/x-tcl                    tcl tk;
    application/x-x509-ca-cert            crt der pem;
    application/x-xpinstall              xpi;
    application/xhtml+xml                xhtml;
    application/xslt+xml                  xsl;
    application/zip                      zip;
    text/css                              css;
    text/html                            htm html shtml;
    text/mathml                          mml;
    text/plain                            txt;
    text/vcard                            vcard vcf;
    text/vnd.rim.location.xloc            xloc;
    text/vnd.sun.j2me.app-descriptor      jad;
    text/vnd.wap.wml                      wml;
    text/vtt                              vtt;
    text/x-component                      htc;
 
}

更多 Nginx 相关教程见以下内容

CentOS 6.2 实战部署 Nginx+MySQL+PHP http://www.linuxidc.com/Linux/2013-09/90020.htm

使用 Nginx 搭建 WEB 服务器 http://www.linuxidc.com/Linux/2013-09/89768.htm

搭建基于 Linux6.3+Nginx1.2+PHP5+MySQL5.5 的 Web 服务器全过程 http://www.linuxidc.com/Linux/2013-09/89692.htm

CentOS 6.3 下 Nginx 性能调优 http://www.linuxidc.com/Linux/2013-09/89656.htm

CentOS 6.3 下配置 Nginx 加载 ngx_pagespeed 模块 http://www.linuxidc.com/Linux/2013-09/89657.htm

CentOS 6.4 安装配置 Nginx+Pcre+php-fpm http://www.linuxidc.com/Linux/2013-08/88984.htm

Nginx 安装配置使用详细笔记 http://www.linuxidc.com/Linux/2014-07/104499.htm

Nginx 日志过滤 使用 ngx_log_if 不记录特定日志 http://www.linuxidc.com/Linux/2014-07/104686.htm

Nginx 的详细介绍:请点这里
Nginx 的下载地址:请点这里

本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-01/128014.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计4839字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中