How do I add an environment variable to the CGI module in the conf?
Added by pijimh over 6 years ago
To get mplayer to work from a CGI, I apparently need to add mod_setenv to the configuration (which I have done) and add
setenv.add-environment = ("MPLAYER_HOME" => "/var/www/.mplayer") to the cgi Module.
How do I make the addition to the cgi module?
Raspberry Pi3B running Jessie, lighttpd.conf below.
Thanks!
-----------------------------------------
config { var.PID = 9005 var.CWD = "/var/www/html/cgi-bin" server.modules = ( "mod_indexfile", "mod_auth", "mod_access", "mod_accesslog", "mod_alias", "mod_compress", "mod_redirect", "mod_setenv", "mod_cgi", "mod_fastcgi", "mod_dirlisting", "mod_staticfile", # 12 ) server.document-root = "/var/www/html" server.upload-dirs = ("/var/cache/lighttpd/uploads") server.errorlog = "/var/log/lighttpd/error.log" server.breakagelog = "/var/log/lighttpd/breakage.log" server.pid-file = "/var/run/lighttpd.pid" server.username = "www-data" server.groupname = "www-data" server.port = 80 accesslog.filename = "/var/log/lighttpd/access.log" index-file.names = ("index.php", "index.html", "index.lighttpd.html") url.access-deny = ("~", ".inc") static-file.exclude-extensions = (".php", ".pl", ".fcgi") compress.cache-dir = "/var/cache/lighttpd/compress/" compress.filetype = ("application/javascript", "text/css", "text/html", "text/plain") mimetype.assign = ( ".ez" => "application/andrew-inset", ".anx" => "application/annodex", ".atom" => "application/atom+xml", ".atomcat" => "application/atomcat+xml", ".atomsrv" => "application/atomserv+xml", # 5 ".lin" => "application/bbolin", ".cu" => "application/cu-seeme", ".davmount" => "application/davmount+xml", ".dcm" => "application/dicom", ".tsp" => "application/dsptype", # 10 ".es" => "application/ecmascript", ".otf" => "application/font-sfnt", ".ttf" => "application/font-sfnt", ".pfr" => "application/font-tdpfr", ".woff" => "application/font-woff", # 15 ".spl" => "application/futuresplash", ".gz" => "application/gzip", ".hta" => "application/hta", ".jar" => "application/java-archive", ".ser" => "application/java-serialized-object", # 20 ".class" => "application/java-vm", ".js" => "application/javascript", ".json" => "application/json", ".m3g" => "application/m3g", ".hqx" => "application/mac-binhex40", # 25 ".cpt" => "application/mac-compactpro", ".nb" => "application/mathematica", ".nbp" => "application/mathematica", ".mbox" => "application/mbox", ".mdb" => "application/msaccess", # 30 ".doc" => "application/msword", ".dot" => "application/msword", ".mxf" => "application/mxf", ".bin" => "application/octet-stream", ".oda" => "application/oda", # 35 ".opf" => "application/oebps-package+xml", ".ogx" => "application/ogg", ".one" => "application/onenote", ".onetoc2" => "application/onenote", ".onetmp" => "application/onenote", # 40 ".onepkg" => "application/onenote", ".pdf" => "application/pdf", ".pgp" => "application/pgp-encrypted", ".key" => "application/pgp-keys", ".sig" => "application/pgp-signature", # 45 ".prf" => "application/pics-rules", ".ps" => "application/postscript", ".ai" => "application/postscript", ".eps" => "application/postscript", ".epsi" => "application/postscript", # 50 ".epsf" => "application/postscript", ".eps2" => "application/postscript", ".eps3" => "application/postscript", ".rar" => "application/rar", ".rdf" => "application/rdf+xml", # 55 ".rtf" => "application/rtf", ".stl" => "application/sla", ".smi" => "application/smil+xml", ".smil" => "application/smil+xml", ".xhtml" => "application/xhtml+xml", # 60 ".xht" => "application/xhtml+xml", ".xml" => "application/xml", ".xsd" => "application/xml", ".xsl" => "application/xslt+xml", ".xslt" => "application/xslt+xml", # 65 ".xspf" => "application/xspf+xml", ".zip" => "application/zip", ".apk" => "application/vnd.android.package-archive", ".cdy" => "application/vnd.cinderella", ".deb" => "application/vnd.debian.binary-package", # 70 ".ddeb" => "application/vnd.debian.binary-package", ".udeb" => "application/vnd.debian.binary-package", ".sfd" => "application/vnd.font-fontforge-sfd", ".kml" => "application/vnd.google-earth.kml+xml", ".kmz" => "application/vnd.google-earth.kmz", # 75 ".xul" => "application/vnd.mozilla.xul+xml", ".xls" => "application/vnd.ms-excel", ".xlb" => "application/vnd.ms-excel", ".xlt" => "application/vnd.ms-excel", ".eot" => "application/vnd.ms-fontobject", # 80 ".thmx" => "application/vnd.ms-officetheme", ".cat" => "application/vnd.ms-pki.seccat", ".ppt" => "application/vnd.ms-powerpoint", ".pps" => "application/vnd.ms-powerpoint", ".odc" => "application/vnd.oasis.opendocument.chart", # 85 ".odb" => "application/vnd.oasis.opendocument.database", ".odf" => "application/vnd.oasis.opendocument.formula", ".odg" => "application/vnd.oasis.opendocument.graphics", ".otg" => "application/vnd.oasis.opendocument.graphics-template", ".odi" => "application/vnd.oasis.opendocument.image", # 90 ".odp" => "application/vnd.oasis.opendocument.presentation", ".otp" => "application/vnd.oasis.opendocument.presentation-template", ".ods" => "application/vnd.oasis.opendocument.spreadsheet", ".ots" => "application/vnd.oasis.opendocument.spreadsheet-template", ".odt" => "application/vnd.oasis.opendocument.text", # 95 ".odm" => "application/vnd.oasis.opendocument.text-master", ".ott" => "application/vnd.oasis.opendocument.text-template", ".oth" => "application/vnd.oasis.opendocument.text-web", ".pptx" => "application/vnd.openxmlformats-officedocument.presentationml.presentation", ".sldx" => "application/vnd.openxmlformats-officedocument.presentationml.slide", # 100 ".ppsx" => "application/vnd.openxmlformats-officedocument.presentationml.slideshow", ".potx" => "application/vnd.openxmlformats-officedocument.presentationml.template", ".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ".xltx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.template", ".docx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", # 105 ".dotx" => "application/vnd.openxmlformats-officedocument.wordprocessingml.template", ".cod" => "application/vnd.rim.cod", ".mmf" => "application/vnd.smaf", ".sdc" => "application/vnd.stardivision.calc", ".sds" => "application/vnd.stardivision.chart", # 110 ".sda" => "application/vnd.stardivision.draw", ".sdd" => "application/vnd.stardivision.impress", ".sdf" => "application/vnd.stardivision.math", ".sdw" => "application/vnd.stardivision.writer", ".sgl" => "application/vnd.stardivision.writer-global", # 115 ".sxc" => "application/vnd.sun.xml.calc", ".stc" => "application/vnd.sun.xml.calc.template", ".sxd" => "application/vnd.sun.xml.draw", ".std" => "application/vnd.sun.xml.draw.template", ".sxi" => "application/vnd.sun.xml.impress", # 120 ".sti" => "application/vnd.sun.xml.impress.template", ".sxm" => "application/vnd.sun.xml.math", ".sxw" => "application/vnd.sun.xml.writer", ".sxg" => "application/vnd.sun.xml.writer.global", ".stw" => "application/vnd.sun.xml.writer.template", # 125 ".sis" => "application/vnd.symbian.install", ".cap" => "application/vnd.tcpdump.pcap", ".pcap" => "application/vnd.tcpdump.pcap", ".vsd" => "application/vnd.visio", ".vst" => "application/vnd.visio", # 130 ".vsw" => "application/vnd.visio", ".vss" => "application/vnd.visio", ".wbxml" => "application/vnd.wap.wbxml", ".wmlc" => "application/vnd.wap.wmlc", ".wmlsc" => "application/vnd.wap.wmlscriptc", # 135 ".wpd" => "application/vnd.wordperfect", ".wp5" => "application/vnd.wordperfect5.1", ".wk" => "application/x-123", ".7z" => "application/x-7z-compressed", ".abw" => "application/x-abiword", # 140 ".dmg" => "application/x-apple-diskimage", ".bcpio" => "application/x-bcpio", ".torrent" => "application/x-bittorrent", ".cab" => "application/x-cab", ".cbr" => "application/x-cbr", # 145 ".cbz" => "application/x-cbz", ".cdf" => "application/x-cdf", ".cda" => "application/x-cdf", ".vcd" => "application/x-cdlink", ".pgn" => "application/x-chess-pgn", # 150 ".mph" => "application/x-comsol", ".cpio" => "application/x-cpio", ".csh" => "application/x-csh", ".dcr" => "application/x-director", ".dir" => "application/x-director", # 155 ".dxr" => "application/x-director", ".dms" => "application/x-dms", ".wad" => "application/x-doom", ".dvi" => "application/x-dvi", ".pfa" => "application/x-font", # 160 ".pfb" => "application/x-font", ".gsf" => "application/x-font", ".mm" => "application/x-freemind", ".gan" => "application/x-ganttproject", ".gnumeric" => "application/x-gnumeric", # 165 ".sgf" => "application/x-go-sgf", ".gcf" => "application/x-graphing-calculator", ".gtar" => "application/x-gtar", ".tgz" => "application/x-gtar-compressed", ".taz" => "application/x-gtar-compressed", # 170 ".hdf" => "application/x-hdf", ".hwp" => "application/x-hwp", ".ica" => "application/x-ica", ".info" => "application/x-info", ".ins" => "application/x-internet-signup", # 175 ".isp" => "application/x-internet-signup", ".iii" => "application/x-iphone", ".iso" => "application/x-iso9660-image", ".jam" => "application/x-jam", ".jnlp" => "application/x-java-jnlp-file", # 180 ".jmz" => "application/x-jmol", ".chrt" => "application/x-kchart", ".kil" => "application/x-killustrator", ".skp" => "application/x-koan", ".skd" => "application/x-koan", # 185 ".skt" => "application/x-koan", ".skm" => "application/x-koan", ".kpr" => "application/x-kpresenter", ".kpt" => "application/x-kpresenter", ".ksp" => "application/x-kspread", # 190 ".kwd" => "application/x-kword", ".kwt" => "application/x-kword", ".latex" => "application/x-latex", ".lha" => "application/x-lha", ".lyx" => "application/x-lyx", # 195 ".lzh" => "application/x-lzh", ".lzx" => "application/x-lzx", ".frm" => "application/x-maker", ".maker" => "application/x-maker", ".frame" => "application/x-maker", # 200 ".fm" => "application/x-maker", ".fb" => "application/x-maker", ".book" => "application/x-maker", ".fbdoc" => "application/x-maker", ".mif" => "application/x-mif", # 205 ".wmd" => "application/x-ms-wmd", ".wmz" => "application/x-ms-wmz", ".com" => "application/x-msdos-program", ".exe" => "application/x-msdos-program", ".bat" => "application/x-msdos-program", # 210 ".dll" => "application/x-msdos-program", ".msi" => "application/x-msi", ".nc" => "application/x-netcdf", ".pac" => "application/x-ns-proxy-autoconfig", ".nwc" => "application/x-nwc", # 215 ".o" => "application/x-object", ".oza" => "application/x-oz-application", ".p7r" => "application/x-pkcs7-certreqresp", ".crl" => "application/x-pkcs7-crl", ".pyc" => "application/x-python-code", # 220 ".pyo" => "application/x-python-code", ".qgs" => "application/x-qgis", ".shp" => "application/x-qgis", ".shx" => "application/x-qgis", ".qtl" => "application/x-quicktimeplayer", # 225 ".rdp" => "application/x-rdp", ".rpm" => "application/x-redhat-package-manager", ".rss" => "application/x-rss+xml", ".rb" => "application/x-ruby", ".sci" => "application/x-scilab", # 230 ".sce" => "application/x-scilab", ".xcos" => "application/x-scilab-xcos", ".sh" => "application/x-sh", ".shar" => "application/x-shar", ".swf" => "application/x-shockwave-flash", # 235 ".swfl" => "application/x-shockwave-flash", ".scr" => "application/x-silverlight", ".sql" => "application/x-sql", ".sit" => "application/x-stuffit", ".sitx" => "application/x-stuffit", # 240 ".sv4cpio" => "application/x-sv4cpio", ".sv4crc" => "application/x-sv4crc", ".tar" => "application/x-tar", ".tcl" => "application/x-tcl", ".gf" => "application/x-tex-gf", # 245 ".pk" => "application/x-tex-pk", ".texinfo" => "application/x-texinfo", ".texi" => "application/x-texinfo", ".t" => "application/x-troff", ".tr" => "application/x-troff", # 250 ".roff" => "application/x-troff", ".man" => "application/x-troff-man", ".me" => "application/x-troff-me", ".ms" => "application/x-troff-ms", ".ustar" => "application/x-ustar", # 255 ".src" => "application/x-wais-source", ".wz" => "application/x-wingz", ".crt" => "application/x-x509-ca-cert", ".xcf" => "application/x-xcf", ".fig" => "application/x-xfig", # 260 ".xpi" => "application/x-xpinstall", ".xz" => "application/x-xz", ".amr" => "audio/amr", ".awb" => "audio/amr-wb", ".axa" => "audio/annodex", # 265 ".au" => "audio/basic", ".snd" => "audio/basic", ".csd" => "audio/csound", ".orc" => "audio/csound", ".sco" => "audio/csound", # 270 ".flac" => "audio/flac", ".mid" => "audio/midi", ".midi" => "audio/midi", ".kar" => "audio/midi", ".mpga" => "audio/mpeg", # 275 ".mpega" => "audio/mpeg", ".mp2" => "audio/mpeg", ".mp3" => "audio/mpeg", ".m4a" => "audio/mpeg", ".m3u" => "audio/mpegurl", # 280 ".oga" => "audio/ogg", ".ogg" => "audio/ogg", ".opus" => "audio/ogg", ".spx" => "audio/ogg", ".sid" => "audio/prs.sid", # 285 ".aif" => "audio/x-aiff", ".aiff" => "audio/x-aiff", ".aifc" => "audio/x-aiff", ".gsm" => "audio/x-gsm", ".wma" => "audio/x-ms-wma", # 290 ".wax" => "audio/x-ms-wax", ".ra" => "audio/x-pn-realaudio", ".rm" => "audio/x-pn-realaudio", ".ram" => "audio/x-pn-realaudio", ".pls" => "audio/x-scpls", # 295 ".sd2" => "audio/x-sd2", ".wav" => "audio/x-wav", ".alc" => "chemical/x-alchemy", ".cac" => "chemical/x-cache", ".cache" => "chemical/x-cache", # 300 ".csf" => "chemical/x-cache-csf", ".cbin" => "chemical/x-cactvs-binary", ".cascii" => "chemical/x-cactvs-binary", ".ctab" => "chemical/x-cactvs-binary", ".cdx" => "chemical/x-cdx", # 305 ".cer" => "chemical/x-cerius", ".c3d" => "chemical/x-chem3d", ".chm" => "chemical/x-chemdraw", ".cif" => "chemical/x-cif", ".cmdf" => "chemical/x-cmdf", # 310 ".cml" => "chemical/x-cml", ".cpa" => "chemical/x-compass", ".bsd" => "chemical/x-crossfire", ".csml" => "chemical/x-csml", ".csm" => "chemical/x-csml", # 315 ".ctx" => "chemical/x-ctx", ".cxf" => "chemical/x-cxf", ".cef" => "chemical/x-cxf", ".emb" => "chemical/x-embl-dl-nucleotide", ".embl" => "chemical/x-embl-dl-nucleotide", # 320 ".spc" => "chemical/x-galactic-spc", ".inp" => "chemical/x-gamess-input", ".gam" => "chemical/x-gamess-input", ".gamin" => "chemical/x-gamess-input", ".fch" => "chemical/x-gaussian-checkpoint", # 325 ".fchk" => "chemical/x-gaussian-checkpoint", ".cub" => "chemical/x-gaussian-cube", ".gau" => "chemical/x-gaussian-input", ".gjc" => "chemical/x-gaussian-input", ".gjf" => "chemical/x-gaussian-input", # 330 ".gal" => "chemical/x-gaussian-log", ".gcg" => "chemical/x-gcg8-sequence", ".gen" => "chemical/x-genbank", ".hin" => "chemical/x-hin", ".istr" => "chemical/x-isostar", # 335 ".ist" => "chemical/x-isostar", ".jdx" => "chemical/x-jcamp-dx", ".dx" => "chemical/x-jcamp-dx", ".kin" => "chemical/x-kinemage", ".mcm" => "chemical/x-macmolecule", # 340 ".mmd" => "chemical/x-macromodel-input", ".mmod" => "chemical/x-macromodel-input", ".mol" => "chemical/x-mdl-molfile", ".rd" => "chemical/x-mdl-rdfile", ".rxn" => "chemical/x-mdl-rxnfile", # 345 ".sd" => "chemical/x-mdl-sdfile", ".tgf" => "chemical/x-mdl-tgf", ".mcif" => "chemical/x-mmcif", ".mol2" => "chemical/x-mol2", ".gpt" => "chemical/x-mopac-graph", # 350 ".mop" => "chemical/x-mopac-input", ".mopcrt" => "chemical/x-mopac-input", ".mpc" => "chemical/x-mopac-input", ".zmt" => "chemical/x-mopac-input", ".moo" => "chemical/x-mopac-out", # 355 ".mvb" => "chemical/x-mopac-vib", ".asn" => "chemical/x-ncbi-asn1", ".prt" => "chemical/x-ncbi-asn1-ascii", ".ent" => "chemical/x-ncbi-asn1-ascii", ".val" => "chemical/x-ncbi-asn1-binary", # 360 ".aso" => "chemical/x-ncbi-asn1-binary", ".pdb" => "chemical/x-pdb", ".ros" => "chemical/x-rosdal", ".sw" => "chemical/x-swissprot", ".vms" => "chemical/x-vamas-iso14976", # 365 ".vmd" => "chemical/x-vmd", ".xtel" => "chemical/x-xtel", ".xyz" => "chemical/x-xyz", ".gif" => "image/gif", ".ief" => "image/ief", # 370 ".jp2" => "image/jp2", ".jpg2" => "image/jp2", ".jpeg" => "image/jpeg", ".jpg" => "image/jpeg", ".jpe" => "image/jpeg", # 375 ".jpm" => "image/jpm", ".jpx" => "image/jpx", ".jpf" => "image/jpx", ".pcx" => "image/pcx", ".png" => "image/png", # 380 ".svg" => "image/svg+xml", ".svgz" => "image/svg+xml", ".tiff" => "image/tiff", ".tif" => "image/tiff", ".djvu" => "image/vnd.djvu", # 385 ".djv" => "image/vnd.djvu", ".ico" => "image/vnd.microsoft.icon", ".wbmp" => "image/vnd.wap.wbmp", ".cr2" => "image/x-canon-cr2", ".crw" => "image/x-canon-crw", # 390 ".ras" => "image/x-cmu-raster", ".cdr" => "image/x-coreldraw", ".pat" => "image/x-coreldrawpattern", ".cdt" => "image/x-coreldrawtemplate", ".erf" => "image/x-epson-erf", # 395 ".art" => "image/x-jg", ".jng" => "image/x-jng", ".bmp" => "image/x-ms-bmp", ".nef" => "image/x-nikon-nef", ".orf" => "image/x-olympus-orf", # 400 ".psd" => "image/x-photoshop", ".pnm" => "image/x-portable-anymap", ".pbm" => "image/x-portable-bitmap", ".pgm" => "image/x-portable-graymap", ".ppm" => "image/x-portable-pixmap", # 405 ".rgb" => "image/x-rgb", ".xbm" => "image/x-xbitmap", ".xpm" => "image/x-xpixmap", ".xwd" => "image/x-xwindowdump", ".eml" => "message/rfc822", # 410 ".igs" => "model/iges", ".iges" => "model/iges", ".msh" => "model/mesh", ".mesh" => "model/mesh", ".silo" => "model/mesh", # 415 ".wrl" => "model/vrml", ".vrml" => "model/vrml", ".x3dv" => "model/x3d+vrml", ".x3d" => "model/x3d+xml", ".x3db" => "model/x3d+binary", # 420 ".appcache" => "text/cache-manifest", ".ics" => "text/calendar", ".icz" => "text/calendar", ".css" => "text/css", ".csv" => "text/csv", # 425 ".323" => "text/h323", ".html" => "text/html", ".htm" => "text/html", ".shtml" => "text/html", ".uls" => "text/iuls", # 430 ".mml" => "text/mathml", ".asc" => "text/plain", ".txt" => "text/plain", ".text" => "text/plain", ".pot" => "text/plain", # 435 ".brf" => "text/plain", ".srt" => "text/plain", ".rtx" => "text/richtext", ".sct" => "text/scriptlet", ".wsc" => "text/scriptlet", # 440 ".tm" => "text/texmacs", ".tsv" => "text/tab-separated-values", ".ttl" => "text/turtle", ".vcf" => "text/vcard", ".vcard" => "text/vcard", # 445 ".jad" => "text/vnd.sun.j2me.app-descriptor", ".wml" => "text/vnd.wap.wml", ".wmls" => "text/vnd.wap.wmlscript", ".bib" => "text/x-bibtex", ".boo" => "text/x-boo", # 450 ".h++" => "text/x-c++hdr", ".hpp" => "text/x-c++hdr", ".hxx" => "text/x-c++hdr", ".hh" => "text/x-c++hdr", ".c++" => "text/x-c++src", # 455 ".cpp" => "text/x-c++src", ".cxx" => "text/x-c++src", ".cc" => "text/x-c++src", ".h" => "text/x-chdr", ".htc" => "text/x-component", # 460 ".c" => "text/x-csrc", ".d" => "text/x-dsrc", ".diff" => "text/x-diff", ".patch" => "text/x-diff", ".hs" => "text/x-haskell", # 465 ".java" => "text/x-java", ".ly" => "text/x-lilypond", ".lhs" => "text/x-literate-haskell", ".moc" => "text/x-moc", ".p" => "text/x-pascal", # 470 ".pas" => "text/x-pascal", ".gcd" => "text/x-pcs-gcd", ".pl" => "text/x-perl", ".pm" => "text/x-perl", ".py" => "text/x-python", # 475 ".scala" => "text/x-scala", ".etx" => "text/x-setext", ".sfv" => "text/x-sfv", ".tk" => "text/x-tcl", ".tex" => "text/x-tex", # 480 ".ltx" => "text/x-tex", ".sty" => "text/x-tex", ".cls" => "text/x-tex", ".vcs" => "text/x-vcalendar", ".3gp" => "video/3gpp", # 485 ".axv" => "video/annodex", ".dl" => "video/dl", ".dif" => "video/dv", ".dv" => "video/dv", ".fli" => "video/fli", # 490 ".gl" => "video/gl", ".mpeg" => "video/mpeg", ".mpg" => "video/mpeg", ".mpe" => "video/mpeg", ".mp4" => "video/mp4", # 495 ".qt" => "video/quicktime", ".mov" => "video/quicktime", ".ogv" => "video/ogg", ".webm" => "video/webm", ".mxu" => "video/vnd.mpegurl", # 500 ".flv" => "video/x-flv", ".lsf" => "video/x-la-asf", ".lsx" => "video/x-la-asf", ".mng" => "video/x-mng", ".asf" => "video/x-ms-asf", # 505 ".asx" => "video/x-ms-asf", ".wm" => "video/x-ms-wm", ".wmv" => "video/x-ms-wmv", ".wmx" => "video/x-ms-wmx", ".wvx" => "video/x-ms-wvx", # 510 ".avi" => "video/x-msvideo", ".movie" => "video/x-sgi-movie", ".mpv" => "video/x-matroska", ".mkv" => "video/x-matroska", ".ice" => "x-conference/x-cooltalk", # 515 ".sisx" => "x-epoc/x-sisx-app", ".vrm" => "x-world/x-vrml", # 517 ) fastcgi.server = ( ".php" => ( ( "bin-path" => "/usr/bin/php-cgi", "socket" => "/var/run/lighttpd/php.socket", "max-procs" => 1, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "4", "PHP_FCGI_MAX_REQUESTS" => "10000", # 2 ), "bin-copy-environment" => ("PATH", "SHELL", "USER"), # 5 "broken-scriptfilename" => "enable", # 6 ), ), ) alias.url = ( "/javascript" => "/usr/share/javascript", ) $SERVER["socket"] == "[::]:80" { # block 1 } # end of $SERVER["socket"] == "[::]:80" $HTTP["url"] =~ "^/cgi-bin/" { # block 2 cgi.assign = ( "" => "", ) } # end of $HTTP["url"] =~ "^/cgi-bin/" }
-----------------------------------------------
Replies (7)
RE: How do I add an environment variable to the CGI module in the conf? - Added by gstrauss over 6 years ago
To get mplayer to work from a CGI, I apparently need to add mod_setenv to the configuration (which I have done) and add
setenv.add-environment = ("MPLAYER_HOME" => "/var/www/.mplayer") to the cgi Module.How do I make the addition to the cgi module?
Have you tried the obvious? setenv.add-environment = ("MPLAYER_HOME" => "/var/www/.mplayer")
I don't see that in the config that you have shared. See the doc: Docs_ModSetenv
RE: How do I add an environment variable to the CGI module in the conf? - Added by pijimh over 6 years ago
I've read that line in many places, like
Add the following env var to the 'CGI' module: setenv.add-environment = ("MPLAYER_HOME" => "/var/www/.mplayer")
I've read in doc: Docs_ModSetenv extensively, but it's not obvious to me where the 'CGI' module is in the conf, or how to that line to it.
Do I type setenv.add-environment = ("MPLAYER_HOME" => "/var/www/.mplayer") on the command line?
Do I edit it into the conf file, and where in the file would I add it?
Is there a tool that adds items to the conf?
Sorry, I have not yet learned the proper way to add items to the lighttpd conf, although I have stumbled around enough to add the "mod_setenv" to it. But I would love to learn that!
Thanks.
RE: How do I add an environment variable to the CGI module in the conf? - Added by gstrauss over 6 years ago
What have you tried?
RE: How do I add an environment variable to the CGI module in the conf? - Added by pijimh over 6 years ago
I haven't tried to add the line to the conf, not knowing how or where to add it, and not wanting to break things.
Thanks.
RE: How do I add an environment variable to the CGI module in the conf? - Added by pijimh over 6 years ago
Please, answer this question before assessing my worthiness to ask it:
What is the proper method to make changes to the config file?
A pointer to the concise answer is preferable to a riddle or another question.
Thanks, Jim
RE: How do I add an environment variable to the CGI module in the conf? - Added by gstrauss over 6 years ago
What have you tried?
This is not intended to be a measure of intelligence. It is intended to encourage you to make an honest effort so that we can help you further. If you make an effort and still have problems, then please ask a more detailed follow-up question, including what you have tried, what results you got, and how you have tested.
Please note that this site hosts lighttpd development. It is not the place for <insert distribution here> packaging. Each distro may package lighttpd differently and provide different file layouts of config files. On this site, we do not necessarily have access to every distribution and how it packages lighttpd, nor do we claim to support those distros. In fact, many distros have their own forums for user questions.
RE: How do I add an environment variable to the CGI module in the conf? - Added by pijimh over 6 years ago
I tried reverting back to my Apache2 based build. It works as well as it did a month ago when I started down this dead-end path. Apache is clunky in ways, but it has plenty of history that makes a great resource, and it doesn't suffer from anything as negative as gstrauss.
My Lighttpd efforts are archived, but I tried "sudo apt-get remove --purge lighttpd " and found it to be quite satisfying.
Please do post on the support forum when you are leaving the Lighttpd team.
Solved! Bye-bye.
Thanks, Jim