Project

General

Profile

FastCGI-stderr, nextcloud, Failed to open stream: Permission denied

Added by lib20 about 1 month ago

Lighttpd is behind a reverse proxy with terminal TLS.
html files are served.
When accessing php files returns a 403 code.

After telling about this error on the IRC channel, user gps told that "There is no issue with lighttpd according to the logs shared".

I didn't change a bit in the nextcloud files and installed Apache httpd. Have no error.
So, I guess that something must be wrong, after all, with the fast cgi process used by lighttpd.
I'd really like to use lighttpd, so if you want to take a look, there's the debug info:

$ curl -k https://cloud2.myhostname.com/info.php
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>403 Forbidden</title>
 </head>
 <body>
  <h1>403 Forbidden</h1>
 </body>
</html>

# uname -a
FreeBSD owncl 13.0-RELEASE-p3 FreeBSD 13.0-RELEASE-p3 #0: Tue Jun 29 19:46:20 UTC 2021     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

# lighttpd -v
lighttpd/1.4.59 (ssl) - a light and fast webserver

# lighttpd -tt -f /usr/local/etc/lighttpd/lighttpd.conf
(no output)

# lighttpd -p -f /usr/local/etc/lighttpd/lighttpd.conf 

config {
    var.PID                        = 95449
    var.CWD                        = "/usr/home/owncl" 
    var.log_root                   = "/var/log/lighttpd" 
    var.server_root                = "/usr/local/www/lighttpd" 
    var.state_dir                  = "/var/run" 
    var.home_dir                   = "/var/run/lighttpd" 
    var.conf_dir                   = "/usr/local/etc/lighttpd" 
    var.cache_dir                  = "/var/cache/lighttpd" 
    var.socket_dir                 = "/var/run/lighttpd/sockets" 
    server.errorlog                = "/var/log/lighttpd/error.log" 
    extforward.headers             = ("X-Real-IP")
    extforward.forwarder           = (
        "192.168.3.4" => "trust",
    )
    server.port                    = 80
    server.use-ipv6                = "disable" 
    server.bind                    = "192.168.16.5" 
    server.username                = "www" 
    server.groupname               = "www" 
    server.document-root           = "/usr/local/www/nextcloud" 
    server.pid-file                = "/var/run/lighttpd.pid" 
    server.modules                 = ("mod_fastcgi", "mod_access", "mod_accesslog", "mod_extforward", "mod_accesslog")
    accesslog.filename             = "/var/log/lighttpd/access.log" 
    server.event-handler           = "kqueue" 
    server.network-backend         = "writev" 
    server.max-fds                 = 2048
    server.stat-cache-engine       = "simple" 
    server.max-connections         = 1024
    index-file.names               = ("index.xhtml", "index.html", "index.htm", "default.htm", "index.php")
    url.access-deny                = ("~", ".inc")
    static-file.exclude-extensions = (".php", ".pl", ".fcgi", ".scgi")
    mimetype.assign                = (
        ".1905.1"      => "application/vnd.ieee.1905",
        ".tar.bz2"     => "application/x-gtar-compressed",
        ".tar.gz"      => "application/x-gtar-compressed",
        ".a2l"         => "application/A2L",
        ".aml"         => "application/AML",
        # 5
        ".atf"         => "application/ATF",
        ".atfx"        => "application/ATFX",
        ".atxml"       => "application/ATXML",
        ".cdfx"        => "application/CDFX+XML",
        ".cea"         => "application/CEA",
        # 10
        ".dcd"         => "application/DCD",
        ".dii"         => "application/DII",
        ".dit"         => "application/DIT",
        ".lxf"         => "application/LXF",
        ".mf4"         => "application/MF4",
        # 15
        ".odx"         => "application/ODX",
        ".pdx"         => "application/PDX",
        ".ez"          => "application/andrew-inset",
        ".atom"        => "application/atom+xml",
        ".atomcat"     => "application/atomcat+xml",
        # 20
        ".atomdeleted" => "application/atomdeleted+xml",
        ".atomsvc"     => "application/atomsvc+xml",
        ".dwd"         => "application/atsc-dwd+xml",
        ".held"        => "application/atsc-held+xml",
        ".rsat"        => "application/atsc-rsat+xml",
        # 25
        ".apxml"       => "application/auth-policy+xml",
        ".xdd"         => "application/bacnet-xdd+zip",
        ".xcs"         => "application/calendar+xml",
        ".cbor"        => "application/cbor",
        ".c3ex"        => "application/cccex",
        # 30
        ".ccmp"        => "application/ccmp+xml",
        ".ccxml"       => "application/ccxml+xml",
        ".cdmia"       => "application/cdmi-capability",
        ".cdmic"       => "application/cdmi-container",
        ".cdmid"       => "application/cdmi-domain",
        # 35
        ".cdmio"       => "application/cdmi-object",
        ".cdmiq"       => "application/cdmi-queue",
        ".cellml"      => "application/cellml+xml",
        ".cml"         => "application/cellml+xml",
        ".cmsc"        => "application/cms",
        # 40
        ".cpl"         => "application/cpl+xml",
        ".csrattrs"    => "application/csrattrs",
        ".mpd"         => "application/dash+xml",
        ".mpdd"        => "application/dashdelta",
        ".davmount"    => "application/davmount+xml",
        # 45
        ".dcm"         => "application/dicom",
        ".xmls"        => "application/dskpp+xml",
        ".dssc"        => "application/dssc+der",
        ".xdssc"       => "application/dssc+xml",
        ".dvc"         => "application/dvcs",
        # 50
        ".es"          => "application/ecmascript",
        ".efi"         => "application/efi",
        ".emma"        => "application/emma+xml",
        ".emotionml"   => "application/emotionml+xml",
        ".epub"        => "application/epub+zip",
        # 55
        ".exi"         => "application/exi",
        ".finf"        => "application/fastinfoset",
        ".fdt"         => "application/fdt+xml",
        ".pfr"         => "application/font-tdpfr",
        ".geojson"     => "application/geo+json",
        # 60
        ".gpkg"        => "application/geopackage+sqlite3",
        ".glbin"       => "application/gltf-buffer",
        ".glbuf"       => "application/gltf-buffer",
        ".gml"         => "application/gml+xml",
        ".gz"          => "application/gzip",
        # 65
        ".tgz"         => "application/gzip",
        ".stk"         => "application/hyperstudio",
        ".ink"         => "application/inkml+xml",
        ".inkml"       => "application/inkml+xml",
        ".ipfix"       => "application/ipfix",
        # 70
        ".its"         => "application/its+xml",
        ".js"          => "application/javascript",
        ".jrd"         => "application/jrd+json",
        ".json"        => "application/json",
        ".json-patch"  => "application/json-patch+json",
        # 75
        ".jsonld"      => "application/ld+json",
        ".lgr"         => "application/lgr+xml",
        ".wlnk"        => "application/link-format",
        ".lostxml"     => "application/lost+xml",
        ".lostsyncxml" => "application/lostsync+xml",
        # 80
        ".lpf"         => "application/lpf+zip",
        ".hqx"         => "application/mac-binhex40",
        ".cpt"         => "application/mac-compactpro",
        ".mads"        => "application/mads+xml",
        ".mrc"         => "application/marc",
        # 85
        ".mrcx"        => "application/marcxml+xml",
        ".ma"          => "application/mathematica",
        ".mb"          => "application/mathematica",
        ".nb"          => "application/mathematica",
        ".mml"         => "application/mathml+xml",
        # 90
        ".mbox"        => "application/mbox",
        ".metalink"    => "application/metalink+xml",
        ".meta4"       => "application/metalink4+xml",
        ".mets"        => "application/mets+xml",
        ".maei"        => "application/mmt-aei+xml",
        # 95
        ".musd"        => "application/mmt-usd+xml",
        ".mods"        => "application/mods+xml",
        ".m21"         => "application/mp21",
        ".mp21"        => "application/mp21",
        ".doc"         => "application/msword",
        # 100
        ".mxf"         => "application/mxf",
        ".nq"          => "application/n-quads",
        ".nt"          => "application/n-triples",
        ".orq"         => "application/ocsp-request",
        ".ors"         => "application/ocsp-response",
        # 105
        ".bin"         => "application/octet-stream",
        ".class"       => "application/octet-stream",
        ".dll"         => "application/octet-stream",
        ".exe"         => "application/octet-stream",
        ".img"         => "application/octet-stream",
        # 110
        ".iso"         => "application/octet-stream",
        ".lha"         => "application/octet-stream",
        ".lzh"         => "application/octet-stream",
        ".so"          => "application/octet-stream",
        ".oda"         => "application/oda",
        # 115
        ".opf"         => "application/oebps-package+xml",
        ".ogx"         => "application/ogg",
        ".owx"         => "application/owl+xml",
        ".oxps"        => "application/oxps",
        ".relo"        => "application/p2p-overlay+xml",
        # 120
        ".pdf"         => "application/pdf",
        ".pem"         => "application/pem-certificate-chain",
        ".pgp"         => "application/pgp-encrypted",
        ".sig"         => "application/pgp-signature",
        ".p10"         => "application/pkcs10",
        # 125
        ".p12"         => "application/pkcs12",
        ".pfx"         => "application/pkcs12",
        ".p7c"         => "application/pkcs7-mime",
        ".p7m"         => "application/pkcs7-mime",
        ".p7s"         => "application/pkcs7-signature",
        # 130
        ".p8"          => "application/pkcs8",
        ".p8e"         => "application/pkcs8-encrypted",
        ".cer"         => "application/pkix-cert",
        ".crl"         => "application/pkix-crl",
        ".pkipath"     => "application/pkix-pkipath",
        # 135
        ".pki"         => "application/pkixcmp",
        ".pls"         => "application/pls+xml",
        ".ai"          => "application/postscript",
        ".eps"         => "application/postscript",
        ".ps"          => "application/postscript",
        # 140
        ".provx"       => "application/provenance+xml",
        ".cw"          => "application/prs.cww",
        ".cww"         => "application/prs.cww",
        ".hpub"        => "application/prs.hpub+zip",
        ".rct"         => "application/prs.nprend",
        # 145
        ".rnd"         => "application/prs.nprend",
        ".rdf-crypt"   => "application/prs.rdf-xml-crypt",
        ".xsf"         => "application/prs.xsf+xml",
        ".pskcxml"     => "application/pskc+xml",
        ".rdf"         => "application/rdf+xml",
        # 150
        ".rif"         => "application/reginfo+xml",
        ".rnc"         => "application/relax-ng-compact-syntax",
        ".rl"          => "application/resource-lists+xml",
        ".rld"         => "application/resource-lists-diff+xml",
        ".rfcxml"      => "application/rfc+xml",
        # 155
        ".rs"          => "application/rls-services+xml",
        ".rapd"        => "application/route-apd+xml",
        ".sls"         => "application/route-s-tsid+xml",
        ".rusd"        => "application/route-usd+xml",
        ".gbr"         => "application/rpki-ghostbusters",
        # 160
        ".mft"         => "application/rpki-manifest",
        ".roa"         => "application/rpki-roa",
        ".rss"         => "application/rss+xml",
        ".rtf"         => "application/rtf",
        ".scim"        => "application/scim+json",
        # 165
        ".scq"         => "application/scvp-cv-request",
        ".scs"         => "application/scvp-cv-response",
        ".spq"         => "application/scvp-vp-request",
        ".spp"         => "application/scvp-vp-response",
        ".sdp"         => "application/sdp",
        # 170
        ".senmlc"      => "application/senml+cbor",
        ".senml"       => "application/senml+json",
        ".senmlx"      => "application/senml+xml",
        ".senml-etchc" => "application/senml-etch+cbor",
        ".senml-etchj" => "application/senml-etch+json",
        # 175
        ".senmle"      => "application/senml-exi",
        ".sensmlc"     => "application/sensml+cbor",
        ".sensml"      => "application/sensml+json",
        ".sensmlx"     => "application/sensml+xml",
        ".sensmle"     => "application/sensml-exi",
        # 180
        ".soc"         => "application/sgml-open-catalog",
        ".shf"         => "application/shf+xml",
        ".sieve"       => "application/sieve",
        ".siv"         => "application/sieve",
        ".cl"          => "application/simple-filter+xml",
        # 185
        ".smi"         => "application/smil+xml",
        ".smil"        => "application/smil+xml",
        ".sml"         => "application/smil+xml",
        ".rq"          => "application/sparql-query",
        ".srx"         => "application/sparql-results+xml",
        # 190
        ".sql"         => "application/sql",
        ".gram"        => "application/srgs",
        ".grxml"       => "application/srgs+xml",
        ".sru"         => "application/sru+xml",
        ".ssml"        => "application/ssml+xml",
        # 195
        ".stix"        => "application/stix+json",
        ".swidtag"     => "application/swid+xml",
        ".tau"         => "application/tamp-apex-update",
        ".auc"         => "application/tamp-apex-update-confirm",
        ".tcu"         => "application/tamp-community-update",
        # 200
        ".cuc"         => "application/tamp-community-update-confirm",
        ".ter"         => "application/tamp-error",
        ".tsa"         => "application/tamp-sequence-adjust",
        ".sac"         => "application/tamp-sequence-adjust-confirm",
        ".tur"         => "application/tamp-update",
        # 205
        ".tuc"         => "application/tamp-update-confirm",
        ".jsontd"      => "application/td+json",
        ".odd"         => "application/tei+xml",
        ".tei"         => "application/tei+xml",
        ".teiCorpus"   => "application/tei+xml",
        # 210
        ".tfi"         => "application/thraud+xml",
        ".tsq"         => "application/timestamp-query",
        ".tsr"         => "application/timestamp-reply",
        ".tsd"         => "application/timestamped-data",
        ".trig"        => "application/trig",
        # 215
        ".ttml"        => "application/ttml+xml",
        ".gsheet"      => "application/urc-grpsheet+xml",
        ".rsheet"      => "application/urc-ressheet+xml",
        ".td"          => "application/urc-targetdesc+xml",
        ".uis"         => "application/urc-uisocketdesc+xml",
        # 220
        ".vxml"        => "application/voicexml+xml",
        ".vcj"         => "application/voucher-cms+json",
        ".wif"         => "application/watcherinfo+xml",
        ".wgt"         => "application/widget",
        ".wsdl"        => "application/wsdl+xml",
        # 225
        ".wspolicy"    => "application/wspolicy+xml",
        ".xav"         => "application/xcap-att+xml",
        ".xca"         => "application/xcap-caps+xml",
        ".xdf"         => "application/xcap-diff+xml",
        ".xel"         => "application/xcap-el+xml",
        # 230
        ".xer"         => "application/xcap-error+xml",
        ".xns"         => "application/xcap-ns+xml",
        ".xht"         => "application/xhtml+xml",
        ".xhtm"        => "application/xhtml+xml",
        ".xhtml"       => "application/xhtml+xml",
        # 235
        ".xlf"         => "application/xliff+xml",
        ".dtd"         => "application/xml-dtd",
        ".xop"         => "application/xop+xml",
        ".xsl"         => "application/xslt+xml",
        ".xslt"        => "application/xslt+xml",
        # 240
        ".mxml"        => "application/xv+xml",
        ".xhvml"       => "application/xv+xml",
        ".xvm"         => "application/xv+xml",
        ".xvml"        => "application/xv+xml",
        ".yang"        => "application/yang",
        # 245
        ".yin"         => "application/yin+xml",
        ".zip"         => "application/zip",
        ".zst"         => "application/zstd",
        ".1km"         => "application/vnd.1000minds.decision-model+xml",
        ".pwn"         => "application/vnd.3M.Post-it-Notes",
        # 250
        ".plb"         => "application/vnd.3gpp.pic-bw-large",
        ".psb"         => "application/vnd.3gpp.pic-bw-small",
        ".pvb"         => "application/vnd.3gpp.pic-bw-var",
        ".sms"         => "application/vnd.3gpp2.sms",
        ".tcap"        => "application/vnd.3gpp2.tcap",
        # 255
        ".imgcal"      => "application/vnd.3lightssoftware.imagescal",
        ".gph"         => "application/vnd.FloGraphIt",
        ".zmm"         => "application/vnd.HandHeld-Entertainment+xml",
        ".kne"         => "application/vnd.Kinar",
        ".knp"         => "application/vnd.Kinar",
        # 260
        ".sdf"         => "application/vnd.Kinar",
        ".mwf"         => "application/vnd.MFER",
        ".daf"         => "application/vnd.Mobius.DAF",
        ".dis"         => "application/vnd.Mobius.DIS",
        ".mbk"         => "application/vnd.Mobius.MBK",
        # 265
        ".mqy"         => "application/vnd.Mobius.MQY",
        ".msl"         => "application/vnd.Mobius.MSL",
        ".plc"         => "application/vnd.Mobius.PLC",
        ".txf"         => "application/vnd.Mobius.TXF",
        ".qwd"         => "application/vnd.Quark.QuarkXPress",
        # 270
        ".qwt"         => "application/vnd.Quark.QuarkXPress",
        ".qxb"         => "application/vnd.Quark.QuarkXPress",
        ".qxd"         => "application/vnd.Quark.QuarkXPress",
        ".qxl"         => "application/vnd.Quark.QuarkXPress",
        ".qxt"         => "application/vnd.Quark.QuarkXPress",
        # 275
        ".twd"         => "application/vnd.SimTech-MindMapper",
        ".twds"        => "application/vnd.SimTech-MindMapper",
        ".aso"         => "application/vnd.accpac.simply.aso",
        ".imp"         => "application/vnd.accpac.simply.imp",
        ".acu"         => "application/vnd.acucobol",
        # 280
        ".acutc"       => "application/vnd.acucorp",
        ".atc"         => "application/vnd.acucorp",
        ".swf"         => "application/vnd.adobe.flash.movie",
        ".fcdt"        => "application/vnd.adobe.formscentral.fcdt",
        ".fxp"         => "application/vnd.adobe.fxp",
        # 285
        ".fxpl"        => "application/vnd.adobe.fxp",
        ".xdp"         => "application/vnd.adobe.xdp+xml",
        ".xfdf"        => "application/vnd.adobe.xfdf",
        ".afp"         => "application/vnd.afpc.modca",
        ".list3820"    => "application/vnd.afpc.modca",
        # 290
        ".listafp"     => "application/vnd.afpc.modca",
        ".pseg3820"    => "application/vnd.afpc.modca",
        ".ovl"         => "application/vnd.afpc.modca-overlay",
        ".psg"         => "application/vnd.afpc.modca-pagesegment",
        ".ahead"       => "application/vnd.ahead.space",
        # 295
        ".azf"         => "application/vnd.airzip.filesecure.azf",
        ".azs"         => "application/vnd.airzip.filesecure.azs",
        ".azw3"        => "application/vnd.amazon.mobi8-ebook",
        ".acc"         => "application/vnd.americandynamics.acc",
        ".ami"         => "application/vnd.amiga.ami",
        # 300
        ".ota"         => "application/vnd.android.ota",
        ".apk"         => "application/vnd.android.package-archive",
        ".apkg"        => "application/vnd.anki",
        ".cii"         => "application/vnd.anser-web-certificate-issue-initiation",
        ".fti"         => "application/vnd.anser-web-funds-transfer-initiation",
        # 305
        ".dist"        => "application/vnd.apple.installer+xml",
        ".distz"       => "application/vnd.apple.installer+xml",
        ".mpkg"        => "application/vnd.apple.installer+xml",
        ".pkg"         => "application/vnd.apple.installer+xml",
        ".keynote"     => "application/vnd.apple.keynote",
        # 310
        ".m3u8"        => "application/vnd.apple.mpegurl",
        ".numbers"     => "application/vnd.apple.numbers",
        ".pages"       => "application/vnd.apple.pages",
        ".swi"         => "application/vnd.aristanetworks.swi",
        ".artisan"     => "application/vnd.artisan+json",
        # 315
        ".iota"        => "application/vnd.astraea-software.iota",
        ".aep"         => "application/vnd.audiograph",
        ".package"     => "application/vnd.autopackage",
        ".bmml"        => "application/vnd.balsamiq.bmml+xml",
        ".bmpr"        => "application/vnd.balsamiq.bmpr",
        # 320
        ".ac2"         => "application/vnd.banana-accounting",
        ".mpm"         => "application/vnd.blueice.multipass",
        ".ep"          => "application/vnd.bluetooth.ep.oob",
        ".le"          => "application/vnd.bluetooth.le.oob",
        ".bmi"         => "application/vnd.bmi",
        # 325
        ".rep"         => "application/vnd.businessobjects",
        ".tlclient"    => "application/vnd.cendio.thinlinc.clientconf",
        ".cdxml"       => "application/vnd.chemdraw+xml",
        ".pgn"         => "application/vnd.chess-pgn",
        ".mmd"         => "application/vnd.chipnuts.karaoke-mmd",
        # 330
        ".cdy"         => "application/vnd.cinderella",
        ".csl"         => "application/vnd.citationstyles.style+xml",
        ".cla"         => "application/vnd.claymore",
        ".rp9"         => "application/vnd.cloanto.rp9",
        ".c4d"         => "application/vnd.clonk.c4group",
        # 335
        ".c4f"         => "application/vnd.clonk.c4group",
        ".c4g"         => "application/vnd.clonk.c4group",
        ".c4p"         => "application/vnd.clonk.c4group",
        ".c4u"         => "application/vnd.clonk.c4group",
        ".c11amc"      => "application/vnd.cluetrust.cartomobile-config",
        # 340
        ".c11amz"      => "application/vnd.cluetrust.cartomobile-config-pkg",
        ".coffee"      => "application/vnd.coffeescript",
        ".xodt"        => "application/vnd.collabio.xodocuments.document",
        ".xott"        => "application/vnd.collabio.xodocuments.document-template",
        ".xodp"        => "application/vnd.collabio.xodocuments.presentation",
        # 345
        ".xotp"        => "application/vnd.collabio.xodocuments.presentation-template",
        ".xods"        => "application/vnd.collabio.xodocuments.spreadsheet",
        ".xots"        => "application/vnd.collabio.xodocuments.spreadsheet-template",
        ".cbz"         => "application/vnd.comicbook+zip",
        ".cbr"         => "application/vnd.comicbook-rar",
        # 350
        ".ic0"         => "application/vnd.commerce-battelle",
        ".ic1"         => "application/vnd.commerce-battelle",
        ".ic2"         => "application/vnd.commerce-battelle",
        ".ic3"         => "application/vnd.commerce-battelle",
        ".ic4"         => "application/vnd.commerce-battelle",
        # 355
        ".ic5"         => "application/vnd.commerce-battelle",
        ".ic6"         => "application/vnd.commerce-battelle",
        ".ic7"         => "application/vnd.commerce-battelle",
        ".ic8"         => "application/vnd.commerce-battelle",
        ".ica"         => "application/vnd.commerce-battelle",
        # 360
        ".icd"         => "application/vnd.commerce-battelle",
        ".icf"         => "application/vnd.commerce-battelle",
        ".csp"         => "application/vnd.commonspace",
        ".cst"         => "application/vnd.commonspace",
        ".cdbcmsg"     => "application/vnd.contact.cmsg",
        # 365
        ".ign"         => "application/vnd.coreos.ignition+json",
        ".ignition"    => "application/vnd.coreos.ignition+json",
        ".cmc"         => "application/vnd.cosmocaller",
        ".clkx"        => "application/vnd.crick.clicker",
        ".clkk"        => "application/vnd.crick.clicker.keyboard",
        # 370
        ".clkp"        => "application/vnd.crick.clicker.palette",
        ".clkt"        => "application/vnd.crick.clicker.template",
        ".clkw"        => "application/vnd.crick.clicker.wordbank",
        ".wbs"         => "application/vnd.criticaltools.wbs+xml",
        ".ssvc"        => "application/vnd.crypto-shade-file",
        # 375
        ".pml"         => "application/vnd.ctc-posml",
        ".ppd"         => "application/vnd.cups-ppd",
        ".curl"        => "application/vnd.curl",
        ".dart"        => "application/vnd.dart",
        ".rdz"         => "application/vnd.data-vision.rdz",
        # 380
        ".dbf"         => "application/vnd.dbf",
        ".deb"         => "application/vnd.debian.binary-package",
        ".udeb"        => "application/vnd.debian.binary-package",
        ".uvd"         => "application/vnd.dece.data",
        ".uvf"         => "application/vnd.dece.data",
        # 385
        ".uvvd"        => "application/vnd.dece.data",
        ".uvvf"        => "application/vnd.dece.data",
        ".uvt"         => "application/vnd.dece.ttml+xml",
        ".uvvt"        => "application/vnd.dece.ttml+xml",
        ".uvvx"        => "application/vnd.dece.unspecified",
        # 390
        ".uvx"         => "application/vnd.dece.unspecified",
        ".uvvz"        => "application/vnd.dece.zip",
        ".uvz"         => "application/vnd.dece.zip",
        ".dsm"         => "application/vnd.desmume.movie",
        ".dna"         => "application/vnd.dna",
        # 395
        ".docjson"     => "application/vnd.document+json",
        ".scld"        => "application/vnd.doremir.scorecloud-binary-document",
        ".dpg"         => "application/vnd.dpgraph",
        ".dpgraph"     => "application/vnd.dpgraph",
        ".mwc"         => "application/vnd.dpgraph",
        # 400
        ".dfac"        => "application/vnd.dreamfactory",
        ".fla"         => "application/vnd.dtg.local.flash",
        ".ait"         => "application/vnd.dvb.ait",
        ".svc"         => "application/vnd.dvb.service",
        ".geo"         => "application/vnd.dynageo",
        # 405
        ".dzr"         => "application/vnd.dzr",
        ".mag"         => "application/vnd.ecowin.chart",
        ".nml"         => "application/vnd.enliven",
        ".esf"         => "application/vnd.epson.esf",
        ".msf"         => "application/vnd.epson.msf",
        # 410
        ".qam"         => "application/vnd.epson.quickanime",
        ".slt"         => "application/vnd.epson.salt",
        ".ssf"         => "application/vnd.epson.ssf",
        ".qca"         => "application/vnd.ericsson.quickcall",
        ".qcall"       => "application/vnd.ericsson.quickcall",
        # 415
        ".espass"      => "application/vnd.espass-espass+zip",
        ".es3"         => "application/vnd.eszigno3+xml",
        ".et3"         => "application/vnd.eszigno3+xml",
        ".asice"       => "application/vnd.etsi.asic-e+zip",
        ".sce"         => "application/vnd.etsi.asic-e+zip",
        # 420
        ".asics"       => "application/vnd.etsi.asic-s+zip",
        ".tst"         => "application/vnd.etsi.timestamp-token",
        ".ecigprofile" => "application/vnd.evolv.ecig.profile",
        ".ecig"        => "application/vnd.evolv.ecig.settings",
        ".ecigtheme"   => "application/vnd.evolv.ecig.theme",
        # 425
        ".mpw"         => "application/vnd.exstream-empower+zip",
        ".pub"         => "application/vnd.exstream-package",
        ".ez2"         => "application/vnd.ezpix-album",
        ".ez3"         => "application/vnd.ezpix-package",
        ".dim"         => "application/vnd.fastcopy-disk-image",
        # 430
        ".fdf"         => "application/vnd.fdf",
        ".msd"         => "application/vnd.fdsn.mseed",
        ".mseed"       => "application/vnd.fdsn.mseed",
        ".dataless"    => "application/vnd.fdsn.seed",
        ".seed"        => "application/vnd.fdsn.seed",
        # 435
        ".flb"         => "application/vnd.ficlab.flb+zip",
        ".zfc"         => "application/vnd.filmit.zfc",
        ".ftc"         => "application/vnd.fluxtime.clip",
        ".sfd"         => "application/vnd.font-fontforge-sfd",
        ".fm"          => "application/vnd.framemaker",
        # 440
        ".fnc"         => "application/vnd.frogans.fnc",
        ".ltf"         => "application/vnd.frogans.ltf",
        ".fsc"         => "application/vnd.fsc.weblaunch",
        ".oas"         => "application/vnd.fujitsu.oasys",
        ".oa2"         => "application/vnd.fujitsu.oasys2",
        # 445
        ".oa3"         => "application/vnd.fujitsu.oasys3",
        ".fg5"         => "application/vnd.fujitsu.oasysgp",
        ".bh2"         => "application/vnd.fujitsu.oasysprs",
        ".ddd"         => "application/vnd.fujixerox.ddd",
        ".xdw"         => "application/vnd.fujixerox.docuworks",
        # 450
        ".xbd"         => "application/vnd.fujixerox.docuworks.binder",
        ".xct"         => "application/vnd.fujixerox.docuworks.container",
        ".fzs"         => "application/vnd.fuzzysheet",
        ".txd"         => "application/vnd.genomatix.tuxedo",
        ".ggb"         => "application/vnd.geogebra.file",
        # 455
        ".ggt"         => "application/vnd.geogebra.tool",
        ".gex"         => "application/vnd.geometry-explorer",
        ".gre"         => "application/vnd.geometry-explorer",
        ".gxt"         => "application/vnd.geonext",
        ".g2w"         => "application/vnd.geoplan",
        # 460
        ".g3w"         => "application/vnd.geospace",
        ".gmx"         => "application/vnd.gmx",
        ".kml"         => "application/vnd.google-earth.kml+xml",
        ".kmz"         => "application/vnd.google-earth.kmz",
        ".gqf"         => "application/vnd.grafeq",
        # 465
        ".gqs"         => "application/vnd.grafeq",
        ".gac"         => "application/vnd.groove-account",
        ".ghf"         => "application/vnd.groove-help",
        ".gim"         => "application/vnd.groove-identity-message",
        ".grv"         => "application/vnd.groove-injector",
        # 470
        ".gtm"         => "application/vnd.groove-tool-message",
        ".tpl"         => "application/vnd.groove-tool-template",
        ".vcg"         => "application/vnd.groove-vcard",
        ".hal"         => "application/vnd.hal+xml",
        ".bpd"         => "application/vnd.hbci",
        # 475
        ".hbc"         => "application/vnd.hbci",
        ".hbci"        => "application/vnd.hbci",
        ".kom"         => "application/vnd.hbci",
        ".pkd"         => "application/vnd.hbci",
        ".upa"         => "application/vnd.hbci",
        # 480
        ".hdt"         => "application/vnd.hdt",
        ".les"         => "application/vnd.hhe.lesson-player",
        ".hpgl"        => "application/vnd.hp-HPGL",
        ".pcl"         => "application/vnd.hp-PCL",
        ".hpi"         => "application/vnd.hp-hpid",
        # 485
        ".hpid"        => "application/vnd.hp-hpid",
        ".hps"         => "application/vnd.hp-hps",
        ".jlt"         => "application/vnd.hp-jlyt",
        ".sfd-hdstx"   => "application/vnd.hydrostatix.sof-data",
        ".x3d"         => "application/vnd.hzn-3d-crossword",
        # 490
        ".mpy"         => "application/vnd.ibm.MiniPay",
        ".emm"         => "application/vnd.ibm.electronic-media",
        ".irm"         => "application/vnd.ibm.rights-management",
        ".sc"          => "application/vnd.ibm.secure-container",
        ".icc"         => "application/vnd.iccprofile",
        # 495
        ".icm"         => "application/vnd.iccprofile",
        ".igl"         => "application/vnd.igloader",
        ".imf"         => "application/vnd.imagemeter.folder+zip",
        ".imi"         => "application/vnd.imagemeter.image+zip",
        ".ivp"         => "application/vnd.immervision-ivp",
        # 500
        ".ivu"         => "application/vnd.immervision-ivu",
        ".imscc"       => "application/vnd.ims.imsccv1p1",
        ".igm"         => "application/vnd.insors.igm",
        ".xpw"         => "application/vnd.intercon.formnet",
        ".xpx"         => "application/vnd.intercon.formnet",
        # 505
        ".i2g"         => "application/vnd.intergeo",
        ".qbo"         => "application/vnd.intu.qbo",
        ".qfx"         => "application/vnd.intu.qfx",
        ".rcprofile"   => "application/vnd.ipunplugged.rcprofile",
        ".irp"         => "application/vnd.irepository.package+xml",
        # 510
        ".xpr"         => "application/vnd.is-xpr",
        ".fcs"         => "application/vnd.isac.fcs",
        ".jam"         => "application/vnd.jam",
        ".rms"         => "application/vnd.jcp.javame.midlet-rms",
        ".jisp"        => "application/vnd.jisp",
        # 515
        ".joda"        => "application/vnd.joost.joda-archive",
        ".ktr"         => "application/vnd.kahootz",
        ".ktz"         => "application/vnd.kahootz",
        ".karbon"      => "application/vnd.kde.karbon",
        ".chrt"        => "application/vnd.kde.kchart",
        # 520
        ".kfo"         => "application/vnd.kde.kformula",
        ".flw"         => "application/vnd.kde.kivio",
        ".kon"         => "application/vnd.kde.kontour",
        ".kpr"         => "application/vnd.kde.kpresenter",
        ".kpt"         => "application/vnd.kde.kpresenter",
        # 525
        ".ksp"         => "application/vnd.kde.kspread",
        ".kwd"         => "application/vnd.kde.kword",
        ".kwt"         => "application/vnd.kde.kword",
        ".htke"        => "application/vnd.kenameaapp",
        ".kia"         => "application/vnd.kidspiration",
        # 530
        ".skd"         => "application/vnd.koan",
        ".skm"         => "application/vnd.koan",
        ".skp"         => "application/vnd.koan",
        ".skt"         => "application/vnd.koan",
        ".sse"         => "application/vnd.kodak-descriptor",
        # 535
        ".lasjson"     => "application/vnd.las.las+json",
        ".lasxml"      => "application/vnd.las.las+xml",
        ".lbd"         => "application/vnd.llamagraphics.life-balance.desktop",
        ".lbe"         => "application/vnd.llamagraphics.life-balance.exchange+xml",
        ".lca"         => "application/vnd.logipipe.circuit+zip",
        # 540
        ".lcs"         => "application/vnd.logipipe.circuit+zip",
        ".loom"        => "application/vnd.loom",
        ".123"         => "application/vnd.lotus-1-2-3",
        ".wk1"         => "application/vnd.lotus-1-2-3",
        ".wk3"         => "application/vnd.lotus-1-2-3",
        # 545
        ".wk4"         => "application/vnd.lotus-1-2-3",
        ".apr"         => "application/vnd.lotus-approach",
        ".vew"         => "application/vnd.lotus-approach",
        ".pre"         => "application/vnd.lotus-freelance",
        ".prz"         => "application/vnd.lotus-freelance",
        # 550
        ".ndl"         => "application/vnd.lotus-notes",
        ".ns2"         => "application/vnd.lotus-notes",
        ".ns3"         => "application/vnd.lotus-notes",
        ".ns4"         => "application/vnd.lotus-notes",
        ".nsf"         => "application/vnd.lotus-notes",
        # 555
        ".nsg"         => "application/vnd.lotus-notes",
        ".nsh"         => "application/vnd.lotus-notes",
        ".ntf"         => "application/vnd.lotus-notes",
        ".or2"         => "application/vnd.lotus-organizer",
        ".or3"         => "application/vnd.lotus-organizer",
        # 560
        ".org"         => "application/vnd.lotus-organizer",
        ".scm"         => "application/vnd.lotus-screencam",
        ".lwp"         => "application/vnd.lotus-wordpro",
        ".sam"         => "application/vnd.lotus-wordpro",
        ".portpkg"     => "application/vnd.macports.portpkg",
        # 565
        ".mvt"         => "application/vnd.mapbox-vector-tile",
        ".mdc"         => "application/vnd.marlin.drm.mdcf",
        ".mmdb"        => "application/vnd.maxmind.maxmind-db",
        ".mcd"         => "application/vnd.mcd",
        ".mc1"         => "application/vnd.medcalcdata",
        # 570
        ".cdkey"       => "application/vnd.mediastation.cdkey",
        ".mfm"         => "application/vnd.mfmp",
        ".flo"         => "application/vnd.micrografx.flo",
        ".igx"         => "application/vnd.micrografx.igx",
        ".mif"         => "application/vnd.mif",
        # 575
        ".mpn"         => "application/vnd.mophun.application",
        ".mpc"         => "application/vnd.mophun.certificate",
        ".xul"         => "application/vnd.mozilla.xul+xml",
        ".3mf"         => "application/vnd.ms-3mfdocument",
        ".cil"         => "application/vnd.ms-artgalry",
        # 580
        ".asf"         => "application/vnd.ms-asf",
        ".cab"         => "application/vnd.ms-cab-compressed",
        ".xla"         => "application/vnd.ms-excel",
        ".xlc"         => "application/vnd.ms-excel",
        ".xlm"         => "application/vnd.ms-excel",
        # 585
        ".xls"         => "application/vnd.ms-excel",
        ".xlt"         => "application/vnd.ms-excel",
        ".xlw"         => "application/vnd.ms-excel",
        ".xlam"        => "application/vnd.ms-excel.addin.macroEnabled.12",
        ".xlsb"        => "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
        # 590
        ".xlsm"        => "application/vnd.ms-excel.sheet.macroEnabled.12",
        ".xltm"        => "application/vnd.ms-excel.template.macroEnabled.12",
        ".eot"         => "application/vnd.ms-fontobject",
        ".chm"         => "application/vnd.ms-htmlhelp",
        ".ims"         => "application/vnd.ms-ims",
        # 595
        ".lrm"         => "application/vnd.ms-lrm",
        ".thmx"        => "application/vnd.ms-officetheme",
        ".pot"         => "application/vnd.ms-powerpoint",
        ".pps"         => "application/vnd.ms-powerpoint",
        ".ppt"         => "application/vnd.ms-powerpoint",
        # 600
        ".ppam"        => "application/vnd.ms-powerpoint.addin.macroEnabled.12",
        ".pptm"        => "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
        ".sldm"        => "application/vnd.ms-powerpoint.slide.macroEnabled.12",
        ".ppsm"        => "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
        ".potm"        => "application/vnd.ms-powerpoint.template.macroEnabled.12",
        # 605
        ".mpp"         => "application/vnd.ms-project",
        ".mpt"         => "application/vnd.ms-project",
        ".tnef"        => "application/vnd.ms-tnef",
        ".tnf"         => "application/vnd.ms-tnef",
        ".docm"        => "application/vnd.ms-word.document.macroEnabled.12",
        # 610
        ".dotm"        => "application/vnd.ms-word.template.macroEnabled.12",
        ".wcm"         => "application/vnd.ms-works",
        ".wdb"         => "application/vnd.ms-works",
        ".wks"         => "application/vnd.ms-works",
        ".wps"         => "application/vnd.ms-works",
        # 615
        ".wpl"         => "application/vnd.ms-wpl",
        ".xps"         => "application/vnd.ms-xpsdocument",
        ".msa"         => "application/vnd.msa-disk-image",
        ".mseq"        => "application/vnd.mseq",
        ".crtr"        => "application/vnd.multiad.creator",
        # 620
        ".cif"         => "application/vnd.multiad.creator.cif",
        ".mus"         => "application/vnd.musician",
        ".msty"        => "application/vnd.muvee.style",
        ".taglet"      => "application/vnd.mynfc",
        ".bkm"         => "application/vnd.nervana",
        # 625
        ".entity"      => "application/vnd.nervana",
        ".kcm"         => "application/vnd.nervana",
        ".request"     => "application/vnd.nervana",
        ".nlu"         => "application/vnd.neurolanguage.nlu",
        ".nimn"        => "application/vnd.nimn",
        # 630
        ".nds"         => "application/vnd.nintendo.nitro.rom",
        ".sfc"         => "application/vnd.nintendo.snes.rom",
        ".smc"         => "application/vnd.nintendo.snes.rom",
        ".nitf"        => "application/vnd.nitf",
        ".nnd"         => "application/vnd.noblenet-directory",
        # 635
        ".nns"         => "application/vnd.noblenet-sealer",
        ".nnw"         => "application/vnd.noblenet-web",
        ".ac"          => "application/vnd.nokia.n-gage.ac+xml",
        ".ngdat"       => "application/vnd.nokia.n-gage.data",
        ".n-gage"      => "application/vnd.nokia.n-gage.symbian.install",
        # 640
        ".rpst"        => "application/vnd.nokia.radio-preset",
        ".rpss"        => "application/vnd.nokia.radio-presets",
        ".edm"         => "application/vnd.novadigm.EDM",
        ".edx"         => "application/vnd.novadigm.EDX",
        ".ext"         => "application/vnd.novadigm.EXT",
        # 645
        ".odc"         => "application/vnd.oasis.opendocument.chart",
        ".otc"         => "application/vnd.oasis.opendocument.chart-template",
        ".odb"         => "application/vnd.oasis.opendocument.database",
        ".odf"         => "application/vnd.oasis.opendocument.formula",
        ".odg"         => "application/vnd.oasis.opendocument.graphics",
        # 650
        ".otg"         => "application/vnd.oasis.opendocument.graphics-template",
        ".odi"         => "application/vnd.oasis.opendocument.image",
        ".oti"         => "application/vnd.oasis.opendocument.image-template",
        ".odp"         => "application/vnd.oasis.opendocument.presentation",
        ".otp"         => "application/vnd.oasis.opendocument.presentation-template",
        # 655
        ".ods"         => "application/vnd.oasis.opendocument.spreadsheet",
        ".ots"         => "application/vnd.oasis.opendocument.spreadsheet-template",
        ".odt"         => "application/vnd.oasis.opendocument.text",
        ".odm"         => "application/vnd.oasis.opendocument.text-master",
        ".ott"         => "application/vnd.oasis.opendocument.text-template",
        # 660
        ".oth"         => "application/vnd.oasis.opendocument.text-web",
        ".xo"          => "application/vnd.olpc-sugar",
        ".dd"          => "application/vnd.oma.dd+xml",
        ".dd2"         => "application/vnd.oma.dd2+xml",
        ".dcf"         => "application/vnd.oma.drm.content",
        # 665
        ".o4a"         => "application/vnd.oma.drm.dcf",
        ".o4v"         => "application/vnd.oma.drm.dcf",
        ".dm"          => "application/vnd.oma.drm.message",
        ".drc"         => "application/vnd.oma.drm.rights+wbxml",
        ".dr"          => "application/vnd.oma.drm.rights+xml",
        # 670
        ".tam"         => "application/vnd.onepager",
        ".tamp"        => "application/vnd.onepagertamp",
        ".tamx"        => "application/vnd.onepagertamx",
        ".tat"         => "application/vnd.onepagertat",
        ".tatp"        => "application/vnd.onepagertatp",
        # 675
        ".tatx"        => "application/vnd.onepagertatx",
        ".obgx"        => "application/vnd.openblox.game+xml",
        ".obg"         => "application/vnd.openblox.game-binary",
        ".oeb"         => "application/vnd.openeye.oeb",
        ".oxt"         => "application/vnd.openofficeorg.extension",
        # 680
        ".osm"         => "application/vnd.openstreetmap.data+xml",
        ".pptx"        => "application/vnd.openxmlformats-officedocument.presentationml.presentation",
        ".sldx"        => "application/vnd.openxmlformats-officedocument.presentationml.slide",
        ".ppsx"        => "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
        ".potx"        => "application/vnd.openxmlformats-officedocument.presentationml.template",
        # 685
        ".xlsx"        => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        ".xltx"        => "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
        ".docx"        => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        ".dotx"        => "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
        ".ndc"         => "application/vnd.osa.netdeploy",
        # 690
        ".mgp"         => "application/vnd.osgeo.mapguide.package",
        ".dp"          => "application/vnd.osgi.dp",
        ".esa"         => "application/vnd.osgi.subsystem",
        ".oxlicg"      => "application/vnd.oxli.countgraph",
        ".oprc"        => "application/vnd.palm",
        # 695
        ".pdb"         => "application/vnd.palm",
        ".pqa"         => "application/vnd.palm",
        ".prc"         => "application/vnd.palm",
        ".plp"         => "application/vnd.panoply",
        ".dive"        => "application/vnd.patentdive",
        # 700
        ".paw"         => "application/vnd.pawaafile",
        ".str"         => "application/vnd.pg.format",
        ".ei6"         => "application/vnd.pg.osasli",
        ".pil"         => "application/vnd.piaccess.application-license",
        ".efif"        => "application/vnd.picsel",
        # 705
        ".wg"          => "application/vnd.pmi.widget",
        ".plf"         => "application/vnd.pocketlearn",
        ".pbd"         => "application/vnd.powerbuilder6",
        ".preminet"    => "application/vnd.preminet",
        ".box"         => "application/vnd.previewsystems.box",
        # 710
        ".vbox"        => "application/vnd.previewsystems.box",
        ".mgz"         => "application/vnd.proteus.magazine",
        ".psfs"        => "application/vnd.psfs",
        ".qps"         => "application/vnd.publishare-delta-tree",
        ".ptid"        => "application/vnd.pvi.ptid1",
        # 715
        ".bar"         => "application/vnd.qualcomm.brew-app-res",
        ".quiz"        => "application/vnd.quobject-quoxdocument",
        ".quox"        => "application/vnd.quobject-quoxdocument",
        ".tree"        => "application/vnd.rainstor.data",
        ".rar"         => "application/vnd.rar",
        # 720
        ".bed"         => "application/vnd.realvnc.bed",
        ".mxl"         => "application/vnd.recordare.musicxml",
        ".cryptonote"  => "application/vnd.rig.cryptonote",
        ".link66"      => "application/vnd.route66.link66+xml",
        ".st"          => "application/vnd.sailingtracker.track",
        # 725
        ".SAR"         => "application/vnd.sar",
        ".scd"         => "application/vnd.scribus",
        ".sla"         => "application/vnd.scribus",
        ".slaz"        => "application/vnd.scribus",
        ".s3df"        => "application/vnd.sealed.3df",
        # 730
        ".scsf"        => "application/vnd.sealed.csf",
        ".s1w"         => "application/vnd.sealed.doc",
        ".sdo"         => "application/vnd.sealed.doc",
        ".sdoc"        => "application/vnd.sealed.doc",
        ".sem"         => "application/vnd.sealed.eml",
        # 735
        ".seml"        => "application/vnd.sealed.eml",
        ".smh"         => "application/vnd.sealed.mht",
        ".smht"        => "application/vnd.sealed.mht",
        ".s1p"         => "application/vnd.sealed.ppt",
        ".sppt"        => "application/vnd.sealed.ppt",
        # 740
        ".stif"        => "application/vnd.sealed.tiff",
        ".s1e"         => "application/vnd.sealed.xls",
        ".sxl"         => "application/vnd.sealed.xls",
        ".sxls"        => "application/vnd.sealed.xls",
        ".s1h"         => "application/vnd.sealedmedia.softseal.html",
        # 745
        ".stml"        => "application/vnd.sealedmedia.softseal.html",
        ".s1a"         => "application/vnd.sealedmedia.softseal.pdf",
        ".spd"         => "application/vnd.sealedmedia.softseal.pdf",
        ".spdf"        => "application/vnd.sealedmedia.softseal.pdf",
        ".see"         => "application/vnd.seemail",
        # 750
        ".sema"        => "application/vnd.sema",
        ".semd"        => "application/vnd.semd",
        ".semf"        => "application/vnd.semf",
        ".ssv"         => "application/vnd.shade-save-file",
        ".ifm"         => "application/vnd.shana.informed.formdata",
        # 755
        ".itp"         => "application/vnd.shana.informed.formtemplate",
        ".iif"         => "application/vnd.shana.informed.interchange",
        ".ipk"         => "application/vnd.shana.informed.package",
        ".shp"         => "application/vnd.shp",
        ".shx"         => "application/vnd.shx",
        # 760
        ".sr"          => "application/vnd.sigrok.session",
        ".mmf"         => "application/vnd.smaf",
        ".notebook"    => "application/vnd.smart.notebook",
        ".teacher"     => "application/vnd.smart.teacher",
        ".pt"          => "application/vnd.snesdev-page-table",
        # 765
        ".ptrom"       => "application/vnd.snesdev-page-table",
        ".fo"          => "application/vnd.software602.filler.form+xml",
        ".zfo"         => "application/vnd.software602.filler.form-xml-zip",
        ".sdkd"        => "application/vnd.solent.sdkm+xml",
        ".sdkm"        => "application/vnd.solent.sdkm+xml",
        # 770
        ".dxp"         => "application/vnd.spotfire.dxp",
        ".sfs"         => "application/vnd.spotfire.sfs",
        ".sqlite"      => "application/vnd.sqlite3",
        ".sqlite3"     => "application/vnd.sqlite3",
        ".smzip"       => "application/vnd.stepmania.package",
        # 775
        ".sm"          => "application/vnd.stepmania.stepchart",
        ".wadl"        => "application/vnd.sun.wadl+xml",
        ".sxc"         => "application/vnd.sun.xml.calc",
        ".stc"         => "application/vnd.sun.xml.calc.template",
        ".sxd"         => "application/vnd.sun.xml.draw",
        # 780
        ".std"         => "application/vnd.sun.xml.draw.template",
        ".sxi"         => "application/vnd.sun.xml.impress",
        ".sti"         => "application/vnd.sun.xml.impress.template",
        ".sxm"         => "application/vnd.sun.xml.math",
        ".sxw"         => "application/vnd.sun.xml.writer",
        # 785
        ".sxg"         => "application/vnd.sun.xml.writer.global",
        ".stw"         => "application/vnd.sun.xml.writer.template",
        ".sus"         => "application/vnd.sus-calendar",
        ".susp"        => "application/vnd.sus-calendar",
        ".sis"         => "application/vnd.symbian.install",
        # 790
        ".xsm"         => "application/vnd.syncml+xml",
        ".bdm"         => "application/vnd.syncml.dm+wbxml",
        ".xdm"         => "application/vnd.syncml.dm+xml",
        ".ddf"         => "application/vnd.syncml.dmddf+xml",
        ".tao"         => "application/vnd.tao.intent-module-archive",
        # 795
        ".cap"         => "application/vnd.tcpdump.pcap",
        ".dmp"         => "application/vnd.tcpdump.pcap",
        ".pcap"        => "application/vnd.tcpdump.pcap",
        ".qvd"         => "application/vnd.theqvd",
        ".ppttc"       => "application/vnd.think-cell.ppttc+json",
        # 800
        ".vfr"         => "application/vnd.tml",
        ".viaframe"    => "application/vnd.tml",
        ".tmo"         => "application/vnd.tmobile-livetv",
        ".tpt"         => "application/vnd.trid.tpt",
        ".mxs"         => "application/vnd.triscape.mxs",
        # 805
        ".tra"         => "application/vnd.trueapp",
        ".frm"         => "application/vnd.ufdl",
        ".ufd"         => "application/vnd.ufdl",
        ".ufdl"        => "application/vnd.ufdl",
        ".utz"         => "application/vnd.uiq.theme",
        # 810
        ".umj"         => "application/vnd.umajin",
        ".unityweb"    => "application/vnd.unity",
        ".uo"          => "application/vnd.uoml+xml",
        ".uoml"        => "application/vnd.uoml+xml",
        ".urim"        => "application/vnd.uri-map",
        # 815
        ".urimap"      => "application/vnd.uri-map",
        ".vmt"         => "application/vnd.valve.source.material",
        ".vcx"         => "application/vnd.vcx",
        ".model-inter" => "application/vnd.vd-study",
        ".mxi"         => "application/vnd.vd-study",
        # 820
        ".study-inter" => "application/vnd.vd-study",
        ".vwx"         => "application/vnd.vectorworks",
        ".istc"        => "application/vnd.veryant.thin",
        ".isws"        => "application/vnd.veryant.thin",
        ".VES"         => "application/vnd.ves.encrypted",
        # 825
        ".vsc"         => "application/vnd.vidsoft.vidconference",
        ".vsd"         => "application/vnd.visio",
        ".vss"         => "application/vnd.visio",
        ".vst"         => "application/vnd.visio",
        ".vsw"         => "application/vnd.visio",
        # 830
        ".vis"         => "application/vnd.visionary",
        ".vsf"         => "application/vnd.vsf",
        ".mms"         => "application/vnd.wap.mms-message",
        ".sic"         => "application/vnd.wap.sic",
        ".slc"         => "application/vnd.wap.slc",
        # 835
        ".wbxml"       => "application/vnd.wap.wbxml",
        ".wmlc"        => "application/vnd.wap.wmlc",
        ".wmlsc"       => "application/vnd.wap.wmlscriptc",
        ".wtb"         => "application/vnd.webturbo",
        ".p2p"         => "application/vnd.wfa.p2p",
        # 840
        ".wsc"         => "application/vnd.wfa.wsc",
        ".wmc"         => "application/vnd.wmc",
        ".m"           => "application/vnd.wolfram.mathematica.package",
        ".nbp"         => "application/vnd.wolfram.player",
        ".wpd"         => "application/vnd.wordperfect",
        # 845
        ".wqd"         => "application/vnd.wqd",
        ".stf"         => "application/vnd.wt.stf",
        ".wv"          => "application/vnd.wv.csp+wbxml",
        ".xar"         => "application/vnd.xara",
        ".xfd"         => "application/vnd.xfdl",
        # 850
        ".xfdl"        => "application/vnd.xfdl",
        ".cpkg"        => "application/vnd.xmpie.cpkg",
        ".dpkg"        => "application/vnd.xmpie.dpkg",
        ".ppkg"        => "application/vnd.xmpie.ppkg",
        ".xlim"        => "application/vnd.xmpie.xlim",
        # 855
        ".hvd"         => "application/vnd.yamaha.hv-dic",
        ".hvs"         => "application/vnd.yamaha.hv-script",
        ".hvp"         => "application/vnd.yamaha.hv-voice",
        ".osf"         => "application/vnd.yamaha.openscoreformat",
        ".saf"         => "application/vnd.yamaha.smaf-audio",
        # 860
        ".spf"         => "application/vnd.yamaha.smaf-phrase",
        ".yme"         => "application/vnd.yaoweme",
        ".cmp"         => "application/vnd.yellowriver-custom-menu",
        ".zir"         => "application/vnd.zul",
        ".zirz"        => "application/vnd.zul",
        # 865
        ".zaz"         => "application/vnd.zzazz.deck+xml",
        ".anx"         => "application/x-annodex",
        ".bcpio"       => "application/x-bcpio",
        ".torrent"     => "application/x-bittorrent",
        ".bz2"         => "application/x-bzip2",
        # 870
        ".vcd"         => "application/x-cdlink",
        ".crx"         => "application/x-chrome-extension",
        ".cpio"        => "application/x-cpio",
        ".csh"         => "application/x-csh",
        ".dcr"         => "application/x-director",
        # 875
        ".dir"         => "application/x-director",
        ".dxr"         => "application/x-director",
        ".dvi"         => "application/x-dvi",
        ".spl"         => "application/x-futuresplash",
        ".gtar"        => "application/x-gtar",
        # 880
        ".tbz"         => "application/x-gtar-compressed",
        ".hdf"         => "application/x-hdf",
        ".jar"         => "application/x-java-archive",
        ".jnlp"        => "application/x-java-jnlp-file",
        ".pack"        => "application/x-java-pack200",
        # 885
        ".kil"         => "application/x-killustrator",
        ".latex"       => "application/x-latex",
        ".cdf"         => "application/x-netcdf",
        ".nc"          => "application/x-netcdf",
        ".pl"          => "application/x-perl",
        # 890
        ".rpm"         => "application/x-rpm",
        ".sh"          => "application/x-sh",
        ".shar"        => "application/x-shar",
        ".sit"         => "application/x-stuffit",
        ".sv4cpio"     => "application/x-sv4cpio",
        # 895
        ".sv4crc"      => "application/x-sv4crc",
        ".tar"         => "application/x-tar",
        ".tcl"         => "application/x-tcl",
        ".tex"         => "application/x-tex",
        ".texi"        => "application/x-texinfo",
        # 900
        ".texinfo"     => "application/x-texinfo",
        ".1"           => "application/x-troff-man",
        ".2"           => "application/x-troff-man",
        ".3"           => "application/x-troff-man",
        ".4"           => "application/x-troff-man",
        # 905
        ".5"           => "application/x-troff-man",
        ".6"           => "application/x-troff-man",
        ".7"           => "application/x-troff-man",
        ".8"           => "application/x-troff-man",
        ".man"         => "application/x-troff-man",
        # 910
        ".me"          => "application/x-troff-me",
        ".ms"          => "application/x-troff-ms",
        ".ustar"       => "application/x-ustar",
        ".src"         => "application/x-wais-source",
        ".xpi"         => "application/x-xpinstall",
        # 915
        ".xspf"        => "application/x-xspf+xml",
        ".xz"          => "application/x-xz",
        ".726"         => "audio/32kadpcm",
        ".amr"         => "audio/AMR",
        ".awb"         => "audio/AMR-WB",
        # 920
        ".aal"         => "audio/ATRAC-ADVANCED-LOSSLESS",
        ".atx"         => "audio/ATRAC-X",
        ".aa3"         => "audio/ATRAC3",
        ".at3"         => "audio/ATRAC3",
        ".omg"         => "audio/ATRAC3",
        # 925
        ".evc"         => "audio/EVRC",
        ".evb"         => "audio/EVRCB",
        ".enw"         => "audio/EVRCNW",
        ".evw"         => "audio/EVRCWB",
        ".l16"         => "audio/L16",
        # 930
        ".smv"         => "audio/SMV",
        ".aac"         => "audio/aac",
        ".adts"        => "audio/aac",
        ".ass"         => "audio/aac",
        ".ac3"         => "audio/ac3",
        # 935
        ".acn"         => "audio/asc",
        ".au"          => "audio/basic",
        ".snd"         => "audio/basic",
        ".dls"         => "audio/dls",
        ".lbc"         => "audio/iLBC",
        # 940
        ".mhas"        => "audio/mhas",
        ".kar"         => "audio/midi",
        ".mid"         => "audio/midi",
        ".midi"        => "audio/midi",
        ".mxmf"        => "audio/mobile-xmf",
        # 945
        ".m4a"         => "audio/mp4",
        ".mp1"         => "audio/mpeg",
        ".mp2"         => "audio/mpeg",
        ".mp3"         => "audio/mpeg",
        ".mpga"        => "audio/mpeg",
        # 950
        ".oga"         => "audio/ogg",
        ".ogg"         => "audio/ogg",
        ".opus"        => "audio/ogg",
        ".spx"         => "audio/ogg",
        ".psid"        => "audio/prs.sid",
        # 955
        ".sid"         => "audio/prs.sid",
        ".qcp"         => "audio/qcelp",
        ".loas"        => "audio/usac",
        ".xhe"         => "audio/usac",
        ".koz"         => "audio/vnd.audikoz",
        # 960
        ".uva"         => "audio/vnd.dece.audio",
        ".uvva"        => "audio/vnd.dece.audio",
        ".eol"         => "audio/vnd.digital-winds",
        ".mlp"         => "audio/vnd.dolby.mlp",
        ".dts"         => "audio/vnd.dts",
        # 965
        ".dtshd"       => "audio/vnd.dts.hd",
        ".plj"         => "audio/vnd.everad.plj",
        ".lvp"         => "audio/vnd.lucent.voice",
        ".pya"         => "audio/vnd.ms-playready.media.pya",
        ".vbk"         => "audio/vnd.nortel.vbk",
        # 970
        ".ecelp4800"   => "audio/vnd.nuera.ecelp4800",
        ".ecelp7470"   => "audio/vnd.nuera.ecelp7470",
        ".ecelp9600"   => "audio/vnd.nuera.ecelp9600",
        ".multitrack"  => "audio/vnd.presonus.multitrack",
        ".rip"         => "audio/vnd.rip",
        # 975
        ".s1m"         => "audio/vnd.sealedmedia.softseal.mpeg",
        ".smp"         => "audio/vnd.sealedmedia.softseal.mpeg",
        ".smp3"        => "audio/vnd.sealedmedia.softseal.mpeg",
        ".aif"         => "audio/x-aiff",
        ".aifc"        => "audio/x-aiff",
        # 980
        ".aiff"        => "audio/x-aiff",
        ".axa"         => "audio/x-annodex",
        ".flac"        => "audio/x-flac",
        ".mka"         => "audio/x-matroska",
        ".669"         => "audio/x-mod",
        # 985
        ".m15"         => "audio/x-mod",
        ".med"         => "audio/x-mod",
        ".mod"         => "audio/x-mod",
        ".mtm"         => "audio/x-mod",
        ".ult"         => "audio/x-mod",
        # 990
        ".uni"         => "audio/x-mod",
        ".m3u"         => "audio/x-mpegurl",
        ".wax"         => "audio/x-ms-wax",
        ".wma"         => "audio/x-ms-wma",
        ".ram"         => "audio/x-pn-realaudio",
        # 995
        ".rm"          => "audio/x-pn-realaudio",
        ".ra"          => "audio/x-realaudio",
        ".s3m"         => "audio/x-s3m",
        ".stm"         => "audio/x-stm",
        ".wav"         => "audio/x-wav",
        # 1000
        ".xyz"         => "chemical/x-xyz",
        ".ttc"         => "font/collection",
        ".otf"         => "font/otf",
        ".ttf"         => "font/ttf",
        ".woff"        => "font/woff",
        # 1005
        ".woff2"       => "font/woff2",
        ".exr"         => "image/aces",
        ".avci"        => "image/avci",
        ".avcs"        => "image/avcs",
        ".bmp"         => "image/bmp",
        # 1010
        ".dib"         => "image/bmp",
        ".cgm"         => "image/cgm",
        ".drle"        => "image/dicom-rle",
        ".emf"         => "image/emf",
        ".fit"         => "image/fits",
        # 1015
        ".fits"        => "image/fits",
        ".fts"         => "image/fits",
        ".gif"         => "image/gif",
        ".heic"        => "image/heic",
        ".heics"       => "image/heic-sequence",
        # 1020
        ".heif"        => "image/heif",
        ".heifs"       => "image/heif-sequence",
        ".hej2"        => "image/hej2k",
        ".hsj2"        => "image/hsj2",
        ".ief"         => "image/ief",
        # 1025
        ".jls"         => "image/jls",
        ".jp2"         => "image/jp2",
        ".jpg2"        => "image/jp2",
        ".jfif"        => "image/jpeg",
        ".jpe"         => "image/jpeg",
        # 1030
        ".jpeg"        => "image/jpeg",
        ".jpg"         => "image/jpeg",
        ".jph"         => "image/jph",
        ".jhc"         => "image/jphc",
        ".jpgm"        => "image/jpm",
        # 1035
        ".jpm"         => "image/jpm",
        ".jpf"         => "image/jpx",
        ".jpx"         => "image/jpx",
        ".jxr"         => "image/jxr",
        ".jxra"        => "image/jxrA",
        # 1040
        ".jxrs"        => "image/jxrS",
        ".jxs"         => "image/jxs",
        ".jxsc"        => "image/jxsc",
        ".jxsi"        => "image/jxsi",
        ".jxss"        => "image/jxss",
        # 1045
        ".ktx"         => "image/ktx",
        ".png"         => "image/png",
        ".btf"         => "image/prs.btif",
        ".btif"        => "image/prs.btif",
        ".pti"         => "image/prs.pti",
        # 1050
        ".svg"         => "image/svg+xml",
        ".svgz"        => "image/svg+xml",
        ".t38"         => "image/t38",
        ".tif"         => "image/tiff",
        ".tiff"        => "image/tiff",
        # 1055
        ".tfx"         => "image/tiff-fx",
        ".webp"        => "image/webp",
        ".wmf"         => "image/wmf",
        ".psd"         => "image/vnd.adobe.photoshop",
        ".azv"         => "image/vnd.airzip.accelerator.azv",
        # 1060
        ".uvg"         => "image/vnd.dece.graphic",
        ".uvi"         => "image/vnd.dece.graphic",
        ".uvvg"        => "image/vnd.dece.graphic",
        ".uvvi"        => "image/vnd.dece.graphic",
        ".djv"         => "image/vnd.djvu",
        # 1065
        ".djvu"        => "image/vnd.djvu",
        ".dwg"         => "image/vnd.dwg",
        ".dxf"         => "image/vnd.dxf",
        ".fbs"         => "image/vnd.fastbidsheet",
        ".fpx"         => "image/vnd.fpx",
        # 1070
        ".fst"         => "image/vnd.fst",
        ".mmr"         => "image/vnd.fujixerox.edmics-mmr",
        ".rlc"         => "image/vnd.fujixerox.edmics-rlc",
        ".pgb"         => "image/vnd.globalgraphics.pgb",
        ".ico"         => "image/vnd.microsoft.icon",
        # 1075
        ".apng"        => "image/vnd.mozilla.apng",
        ".mdi"         => "image/vnd.ms-modi",
        ".hdr"         => "image/vnd.radiance",
        ".rgbe"        => "image/vnd.radiance",
        ".xyze"        => "image/vnd.radiance",
        # 1080
        ".s1n"         => "image/vnd.sealed.png",
        ".spn"         => "image/vnd.sealed.png",
        ".spng"        => "image/vnd.sealed.png",
        ".s1g"         => "image/vnd.sealedmedia.softseal.gif",
        ".sgi"         => "image/vnd.sealedmedia.softseal.gif",
        # 1085
        ".sgif"        => "image/vnd.sealedmedia.softseal.gif",
        ".s1j"         => "image/vnd.sealedmedia.softseal.jpg",
        ".sjp"         => "image/vnd.sealedmedia.softseal.jpg",
        ".sjpg"        => "image/vnd.sealedmedia.softseal.jpg",
        ".tap"         => "image/vnd.tencent.tap",
        # 1090
        ".vtf"         => "image/vnd.valve.source.texture",
        ".wbmp"        => "image/vnd.wap.wbmp",
        ".xif"         => "image/vnd.xiff",
        ".pcx"         => "image/vnd.zbrush.pcx",
        ".ras"         => "image/x-cmu-raster",
        # 1095
        ".pnm"         => "image/x-portable-anymap",
        ".pbm"         => "image/x-portable-bitmap",
        ".pgm"         => "image/x-portable-graymap",
        ".ppm"         => "image/x-portable-pixmap",
        ".rgb"         => "image/x-rgb",
        # 1100
        ".tga"         => "image/x-targa",
        ".xbm"         => "image/x-xbitmap",
        ".xpm"         => "image/x-xpixmap",
        ".xwd"         => "image/x-xwindowdump",
        ".u8msg"       => "message/global",
        # 1105
        ".u8dsn"       => "message/global-delivery-status",
        ".u8mdn"       => "message/global-disposition-notification",
        ".u8hdr"       => "message/global-headers",
        ".art"         => "message/rfc822",
        ".eml"         => "message/rfc822",
        # 1110
        ".mail"        => "message/rfc822",
        ".gltf"        => "model/gltf+json",
        ".glb"         => "model/gltf-binary",
        ".iges"        => "model/iges",
        ".igs"         => "model/iges",
        # 1115
        ".mesh"        => "model/mesh",
        ".msh"         => "model/mesh",
        ".silo"        => "model/mesh",
        ".mtl"         => "model/mtl",
        ".obj"         => "model/obj",
        # 1120
        ".stl"         => "model/stl",
        ".vrml"        => "model/vrml",
        ".wrl"         => "model/vrml",
        ".x3db"        => "model/x3d+xml",
        ".x3dv"        => "model/x3d-vrml",
        # 1125
        ".x3dvz"       => "model/x3d-vrml",
        ".dae"         => "model/vnd.collada+xml",
        ".dwf"         => "model/vnd.dwf",
        ".dor"         => "model/vnd.gdl",
        ".gdl"         => "model/vnd.gdl",
        # 1130
        ".gsm"         => "model/vnd.gdl",
        ".ism"         => "model/vnd.gdl",
        ".lmp"         => "model/vnd.gdl",
        ".msm"         => "model/vnd.gdl",
        ".rsm"         => "model/vnd.gdl",
        # 1135
        ".win"         => "model/vnd.gdl",
        ".gtw"         => "model/vnd.gtw",
        ".moml"        => "model/vnd.moml+xml",
        ".mts"         => "model/vnd.mts",
        ".ogex"        => "model/vnd.opengex",
        # 1140
        ".usdz"        => "model/vnd.usdz+zip",
        ".bsp"         => "model/vnd.valve.source.compiled-map",
        ".vtu"         => "model/vnd.vtu",
        ".vpm"         => "multipart/voice-message",
        ".bmed"        => "multipart/vnd.bint.med-plus",
        # 1145
        ".appcache"    => "text/cache-manifest",
        ".manifest"    => "text/cache-manifest",
        ".ics"         => "text/calendar",
        ".ifb"         => "text/calendar",
        ".css"         => "text/css; charset=utf-8",
        # 1150
        ".csv"         => "text/csv; charset=utf-8",
        ".csvs"        => "text/csv-schema",
        ".soa"         => "text/dns",
        ".zone"        => "text/dns",
        ".htm"         => "text/html",
        # 1155
        ".html"        => "text/html",
        ".sandboxed"   => "text/html-sandboxed",
        ".cnd"         => "text/jcr-cnd",
        ".markdown"    => "text/markdown; charset=utf-8",
        ".md"          => "text/markdown; charset=utf-8",
        # 1160
        ".miz"         => "text/mizar",
        ".n3"          => "text/n3",
        ".asc"         => "text/plain; charset=utf-8",
        ".c"           => "text/plain; charset=utf-8",
        ".cc"          => "text/plain; charset=utf-8",
        # 1165
        ".conf"        => "text/plain; charset=utf-8",
        ".cxx"         => "text/plain; charset=utf-8",
        ".el"          => "text/plain; charset=utf-8",
        ".f90"         => "text/plain; charset=utf-8",
        ".h"           => "text/plain; charset=utf-8",
        # 1170
        ".hh"          => "text/plain; charset=utf-8",
        ".hxx"         => "text/plain; charset=utf-8",
        ".log"         => "text/plain; charset=utf-8",
        ".pm"          => "text/plain; charset=utf-8",
        ".spec"        => "text/plain; charset=utf-8",
        # 1175
        ".text"        => "text/plain; charset=utf-8",
        ".txt"         => "text/plain; charset=utf-8",
        ".provn"       => "text/provenance-notation",
        ".rst"         => "text/prs.fallenstein.rst",
        ".dsc"         => "text/prs.lines.tag",
        # 1180
        ".tag"         => "text/prs.lines.tag",
        ".rtx"         => "text/richtext",
        ".sgm"         => "text/sgml",
        ".sgml"        => "text/sgml",
        ".tsv"         => "text/tab-separated-values",
        # 1185
        ".roff"        => "text/troff",
        ".t"           => "text/troff",
        ".tr"          => "text/troff",
        ".ttl"         => "text/turtle",
        ".uri"         => "text/uri-list",
        # 1190
        ".uris"        => "text/uri-list",
        ".vcard"       => "text/vcard",
        ".vcf"         => "text/vcard",
        ".vtt"         => "text/vtt",
        ".rng"         => "text/xml",
        # 1195
        ".xml"         => "text/xml",
        ".xsd"         => "text/xml",
        ".ent"         => "text/xml-external-parsed-entity",
        ".dms"         => "text/vnd.DMClientScript",
        ".a"           => "text/vnd.a",
        # 1200
        ".abc"         => "text/vnd.abc",
        ".ascii"       => "text/vnd.ascii-art",
        ".copyright"   => "text/vnd.debian.copyright",
        ".sub"         => "text/vnd.dvb.subtitle",
        ".jtd"         => "text/vnd.esmertec.theme-descriptor",
        # 1205
        ".flt"         => "text/vnd.ficlab.flt",
        ".fly"         => "text/vnd.fly",
        ".flx"         => "text/vnd.fmi.flexstor",
        ".dot"         => "text/vnd.graphviz",
        ".gv"          => "text/vnd.graphviz",
        # 1210
        ".hgl"         => "text/vnd.hgl",
        ".3dm"         => "text/vnd.in3d.3dml",
        ".3dml"        => "text/vnd.in3d.3dml",
        ".spo"         => "text/vnd.in3d.spot",
        ".spot"        => "text/vnd.in3d.spot",
        # 1215
        ".mpf"         => "text/vnd.ms-mediapackage",
        ".ccc"         => "text/vnd.net2phone.commcenter.command",
        ".mc2"         => "text/vnd.senx.warpscript",
        ".uric"        => "text/vnd.si.uricatalogue",
        ".sos"         => "text/vnd.sosi",
        # 1220
        ".jad"         => "text/vnd.sun.j2me.app-descriptor",
        ".ts"          => "text/vnd.trolltech.linguist",
        ".si"          => "text/vnd.wap.si",
        ".sl"          => "text/vnd.wap.sl",
        ".wml"         => "text/vnd.wap.wml",
        # 1225
        ".wmls"        => "text/vnd.wap.wmlscript",
        ".pod"         => "text/x-pod",
        ".etx"         => "text/x-setext",
        ".3gp"         => "video/3gpp",
        ".3gpp"        => "video/3gpp",
        # 1230
        ".3g2"         => "video/3gpp2",
        ".3gpp2"       => "video/3gpp2",
        ".m4s"         => "video/iso.segment",
        ".mj2"         => "video/mj2",
        ".mjp2"        => "video/mj2",
        # 1235
        ".m4v"         => "video/mp4",
        ".mp4"         => "video/mp4",
        ".mpg4"        => "video/mp4",
        ".m1v"         => "video/mpeg",
        ".m2v"         => "video/mpeg",
        # 1240
        ".mpe"         => "video/mpeg",
        ".mpeg"        => "video/mpeg",
        ".mpg"         => "video/mpeg",
        ".ogv"         => "video/ogg",
        ".mov"         => "video/quicktime",
        # 1245
        ".qt"          => "video/quicktime",
        ".webm"        => "video/webm",
        ".uvh"         => "video/vnd.dece.hd",
        ".uvvh"        => "video/vnd.dece.hd",
        ".uvm"         => "video/vnd.dece.mobile",
        # 1250
        ".uvvm"        => "video/vnd.dece.mobile",
        ".uvu"         => "video/vnd.dece.mp4",
        ".uvvu"        => "video/vnd.dece.mp4",
        ".uvp"         => "video/vnd.dece.pd",
        ".uvvp"        => "video/vnd.dece.pd",
        # 1255
        ".uvs"         => "video/vnd.dece.sd",
        ".uvvs"        => "video/vnd.dece.sd",
        ".uvv"         => "video/vnd.dece.video",
        ".uvvv"        => "video/vnd.dece.video",
        ".dvb"         => "video/vnd.dvb.file",
        # 1260
        ".fvt"         => "video/vnd.fvt",
        ".m4u"         => "video/vnd.mpegurl",
        ".mxu"         => "video/vnd.mpegurl",
        ".pyv"         => "video/vnd.ms-playready.media.pyv",
        ".nim"         => "video/vnd.nokia.interleaved-multimedia",
        # 1265
        ".bik"         => "video/vnd.radgamettools.bink",
        ".bk2"         => "video/vnd.radgamettools.bink",
        ".smk"         => "video/vnd.radgamettools.smacker",
        ".s11"         => "video/vnd.sealed.mpeg1",
        ".smpg"        => "video/vnd.sealed.mpeg1",
        # 1270
        ".s14"         => "video/vnd.sealed.mpeg4",
        ".ssw"         => "video/vnd.sealed.swf",
        ".sswf"        => "video/vnd.sealed.swf",
        ".s1q"         => "video/vnd.sealedmedia.softseal.mov",
        ".smo"         => "video/vnd.sealedmedia.softseal.mov",
        # 1275
        ".smov"        => "video/vnd.sealedmedia.softseal.mov",
        ".viv"         => "video/vnd.vivo",
        ".yt"          => "video/vnd.youtube.yt",
        ".axv"         => "video/x-annodex",
        ".flv"         => "video/x-flv",
        # 1280
        ".fxm"         => "video/x-javafx",
        ".mkv"         => "video/x-matroska",
        ".mk3d"        => "video/x-matroska-3d",
        ".asx"         => "video/x-ms-asf",
        ".wm"          => "video/x-ms-wm",
        # 1285
        ".wmv"         => "video/x-ms-wmv",
        ".wmx"         => "video/x-ms-wmx",
        ".wvx"         => "video/x-ms-wvx",
        ".avi"         => "video/x-msvideo",
        ".movie"       => "video/x-sgi-movie",
        # 1290
        ".ice"         => "x-conference/x-cooltalk",
        ".sisx"        => "x-epoc/x-sisx-app",
        "README"       => "text/plain; charset=utf-8",
        "Makefile"     => "text/x-makefile; charset=utf-8",
        ""             => "application/octet-stream",
        # 1295
    )
    dir-listing.exclude            = ("~$")
    dir-listing.encoding           = "UTF-8" 

    $SERVER["socket"] == "0.0.0.0:80" {
        # block 1

    } # end of $SERVER["socket"] == "0.0.0.0:80" 
}

# grep -v '^#' /usr/local/etc/lighttpd/modules.conf

server.modules = (
   "mod_fastcgi",
  "mod_access",
  "mod_accesslog",
  "mod_extforward",
)

extforward.headers = ("X-Real-IP")
extforward.forwarder = (
    "192.168.3.4" => "trust",
        )

# grep -v '^#' /usr/local/etc/lighttpd/conf.d/fastcgi.conf
server.modules += ( "mod_fastcgi" )

fastcgi.debug = 1
fastcgi.server = ( ".php" =>
                   ("php-num-procs" =>
                     (
                       "socket" => socket_dir + "/php.socket",
                       #"bin-path" => server_root + "/cgi-bin/php5",
                       "bin-path" => "/usr/local/bin/php-cgi",
                       "bin-environment" => (
                         "PHP_FCGI_CHILDREN" => "4",
                         "PHP_FCGI_MAX_REQUESTS" => "2000",
                       ),
                       "max-procs" => 3,
                       "broken-scriptfilename" => "enable",
                     ),
                   ),
                 )

# ls -l /usr/local/bin/php-cgi 
-rwxr-xr-x  1 root  wheel  5776056 Oct  5 02:22 /usr/local/bin/php-cgi

The log:

2021-10-25 23:03:49: server.c.1513) server started (lighttpd/1.4.59)
2021-10-25 23:03:54: gw_backend.c.944) gw - found a host  0
2021-10-25 23:03:54: gw_backend.c.944) gw - found a host  0
2021-10-25 23:03:54: gw_backend.c.228) got proc: pid: 99023 socket: unix:/var/run/lighttpd/sockets/php.socket-2 load: 1
2021-10-25 23:03:54: mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"file_put_contents(/usr/local/www/nextcloud/data/.htaccess): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#584","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":"","exception":{"Exception":"Error","Message":"file_put_contents(/usr/local/www/nextcloud/data/.htaccess): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#584","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":584,"function":"file_put_contents"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":222,"function":"protectDataDirectory","class":"OC\\Setup","type":"::"},{"file":"/usr/local/www/nextcloud/core/Controller/SetupController.php","line":57,"function":"getSystemInfo","class":"OC\\Setup","type":"->"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":939,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
2021-10-25 23:03:54: mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"file_put_contents(/usr/local/www/nextcloud/data/index.html): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#585","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":"","exception":{"Exception":"Error","Message":"file_put_contents(/usr/local/www/nextcloud/data/index.html): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Setup.php#585","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":585,"function":"file_put_contents"},{"file":"/usr/local/www/nextcloud/lib/private/Setup.php","line":222,"function":"protectDataDirectory","class":"OC\\Setup","type":"::"},{"file":"/usr/local/www/nextcloud/core/Controller/SetupController.php","line":57,"function":"getSystemInfo","class":"OC\\Setup","type":"->"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":939,"function":"run","class":"OC\\Core\\Controller\\SetupController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
2021-10-25 23:03:54: mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":2,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Could not detect any host in https:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}
2021-10-25 23:03:54: mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":2,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"no app in context","method":"GET","url":"/index.php","message":"Could not detect any host in http:///data/htaccesstest.txt","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}
2021-10-25 23:03:55: mod_fastcgi.c.487) FastCGI-stderr:{"reqId":"5HVsZcmvRCF7Qpm918A6","level":3,"time":"2021-10-25T22:03:55+00:00","remoteAddr":"111.222.33.44","user":"--","app":"PHP","method":"GET","url":"/index.php","message":"fopen(/var/log/nextcloud/nextcloud.log): Failed to open stream: Permission denied at /usr/local/www/nextcloud/lib/private/Log/File.php#84","userAgent":"Mozilla/5.0 (X11; FreeBSD amd64; rv:93.0) Gecko/20100101 Firefox/93.0","version":""}
2021-10-25 23:03:55: gw_backend.c.303) released proc: pid: 99023 socket: unix:/var/run/lighttpd/sockets/php.socket-2 load: 0

Replies (5)

RE: FastCGI-stderr, nextcloud, Failed to open stream: Permission denied - Added by gstrauss about 1 month ago

After telling about this error on the IRC channel, user gps told that "There is no issue with lighttpd according to the logs shared".

That means exactly what it says. "There is no issue with lighttpd according to the logs shared"

The errors are being reported by your nextcloud installation.

Since you have configured lighttpd to start the PHP backend server, lighttpd starts the backend server under the same user that lighttpd is running, which in your config is:
server.username = "www"
server.groupname = "www"

If this is not correct for your Nextcloud installation, then you should look into why there is a mismatch.

I didn't change a bit in the nextcloud files and installed Apache httpd. Have no error.

Check your system. Does the FreeBSD package run apache as a different user? Does the nextcloud package expect to be run as that user? Is that user different than the lighttpd package, for which you are using user "www"?

You're running FreeBSD, so I am surprised that you are having trouble understanding that the issue is likely a mismatch of user accounts on your system, and is not an issue with lighttpd.

This website is for the lighttpd web server, which runs on many different platforms. The package management is different for each OS and each distro, and is outside the control of the lighttpd developers.

As a possible alternative solution, lighttpd recommends configuring PHP-FPM to run backend services such as NextCloud independently from lighttpd, and as a different user.

Questions about package management on FreeBSD, including Apache, Nextcloud, lighttpd, PHP-FPM, and everything else FreeBSD-specific is better asked on FreeBSD-specific forums, not this lighttpd forum.

RE: FastCGI-stderr, nextcloud, Failed to open stream: Permission denied - Added by lib20 about 1 month ago

I've nailed the problem, already.
In the

modules.conf
file I forgot to include the
conf.d/fastcgi.conf
.

Don't know if there are default values assigned to the

fastcgi.*
variables, but it would be a good idea to add an assert to check whether the values are set or not.

Thank you for your support.
Permissions were fine.
Maybe this reason could be included in

https://redmine.lighttpd.net/projects/lighttpd/wiki/FrequentlyAskedQuestions

RE: FastCGI-stderr, nextcloud, Failed to open stream: Permission denied - Added by gstrauss about 1 month ago

You seem to be looking for excuses to blame someone else and not yourself. lighttpd is modular and can be configured to do many different things. It is curious that you think lighttpd should always do exactly what you want.

FastCGI dynamic handling must be configured in lighttpd.conf to be enabled. To do otherwise could create an unwanted security exposure.

Further, the packagers on each OS and each distro can control the defaults in the package. This is not in the control of lighttpd developers.

Maybe this reason could be included in https://redmine.lighttpd.net/projects/lighttpd/wiki/FrequentlyAskedQuestions

That is reserved for questions that are frequently asked and for which the answer is not simply "read the fine manual".

The second Q/A in the FAQ is: Why is my lighttpd config not doing what I want it to do?

RE: FastCGI-stderr, nextcloud, Failed to open stream: Permission denied - Added by lib20 about 1 month ago

I'm not blaming anyone, not even myself.
Blame is a sentiment that I want distance from.

Going further, you and the other developers have a thorough understanding of the protocols and of the program. You're experts on these matters.
But the vast majority of people that use lighttpd (or other http servers) are not experts on these areas that are very complex. And besides complex, they are always changing. Each of us has different areas of knowledge in different degrees.

Of course that I am the only responsible (not guilty) for what happened.
But in the same way that the new version of lighttpd won't need modules to be ordered manually as the programming will sort them out automatically, some asserts, warnings or some other automated and comprehensible way (for non-experts in this field) could be added to the output.

When I'm doing something for other people, I use to place myself in the shoes of the other ones. Only when we do that we can get a better understanding. And by doing that, something will be better, probably for many people. This is not for software, but for life in general.

For this case, an assert will probably take four lines and five minutes of a developer time. But will save (guessing) 3h * hundreds or thousands of people. And will save developers some time answering questions like mine, or my last one that is going to be addressed exactly by the automated ordering of modules. So, the five minutes for checking fastcgi, five, ten or fifteen for each of the other modules will pay off, even for the developers. And as a bonus, lighttpd becomes more popular.

Of course, you don't have to do that. I'm grateful to have this software as many others to use and not having to pay. Like OpenBSD, they do it for themselves and who wants to use it has to dance their music...

I referred the FAQ and did the procedure that you mentioned. But it is also mentioned there that

 Nine times out of ten (in IRC support), you have forgotten to check the permissions on one of the parent directories

I guess that not having fastcgi.conf included could also be part of the warning.

All the best.

RE: FastCGI-stderr, nextcloud, Failed to open stream: Permission denied - Added by gstrauss about 1 month ago

You seem eager to give advice. Have you considered reviewing your posts for flawed logic and unsubstantiated statements?

Going further, you and the other developers have a thorough understanding of the protocols and of the program. You're experts on these matters.

Basic configuration is basic, and does not require a thorough understanding of the protocols.

I guess that not having fastcgi.conf included could also be part of the warning.

You seem to have somehow concluded that your mistake is common. How do you know that?

In contrast to your blanket assumption, I know that other distros package lighttpd differently. For example, Debian provides lighty-enable-mod fastcgi to enable mod_fastcgi along with a default fastcgi config, so your issue is much less likely on Debian. Numerous OS distros have lighttpd.conf containing something like include "/etc/lighttpd/conf.d/*.conf" in the default lighttpd.conf, and so are nearly immune to your mistake of forgetting to include a config file.

For this case, an assert will probably take four lines and five minutes of a developer time.

If you think that is the case, please suggest a patch. The "read my mind" code development branch is not yet ready for production (and is not a thing).

There is nothing that I see in your posted output for lighttpd -p -f /usr/local/etc/lighttpd/lighttpd.conf that would run PHP, so what you posted does not appear to be what you were running for NextCloud PHP to run and produce error trace. Instead, lighttpd would have served a 403 Forbidden for /index.php due to static-file.exclude-extensions = (".php", ".pl", ".fcgi", ".scgi") in the lighttpd config you posted.

If you are actually trying to be helpful to others, then instead of posting platitudes, have you considered posting the details of what you were missing in your config that resulted in permission errors for NextCloud? I am a developer, who is supposedly an "expert on these matters" according to you, and I do not know what you overlooked or how you fixed it since what you have shared of your config does not match the error log you shared. (I surmise that in whatever config you did run, you had not configured FastCGI properly, which in your case involved including /usr/local/etc/lighttpd/conf.d/fastcgi.conf.) The lighttpd initial troubleshooting recommendation, which you already found, is to run lighttpd -p -f /usr/local/etc/lighttpd/lighttpd.conf and to review the output.

    (1-5/5)