{"id":651,"date":"2011-12-24T19:46:38","date_gmt":"2011-12-25T03:46:38","guid":{"rendered":"http:\/\/yan.lalife.net\/?p=651"},"modified":"2026-01-20T05:07:21","modified_gmt":"2026-01-20T05:07:21","slug":"setup-lighttpd-for-vedio-streaming","status":"publish","type":"post","link":"http:\/\/www.lalife.net\/?p=651","title":{"rendered":"Setup Lighttpd for Vedio Streaming"},"content":{"rendered":"<p>Lighttpd is said that much lighter that Apache. I tried to set it up for flv and H.264 streaming. The configuration is relatively easy.<\/p>\n<p>1. Download lighttpd-1.4.29.tar.gz<\/p>\n<p>2. Download lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz<br \/>\n   (This is the patch for mod_h264)<\/p>\n<p>3. Open tar ball of lighttpd<br \/>\n   tar zxvf lighttpd-1.4.29.tar.gz<\/p>\n<p>4. Patch h264-mod<br \/>\n   mv lighttpd-1.4.29 lighttpd-1.4.18<br \/>\n   tar zxvf lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz<\/p>\n<p>5. config \/etc\/lighttpd.conf<br \/>\n   basic setup:<\/p>\n<p>   server.port = 80<br \/>\n   server.username  = &#8220;lighttpd&#8221;<br \/>\n   server.groupname = &#8220;lighttpd&#8221;<br \/>\n   server.document-root = &#8220;\/var\/www&#8221;<br \/>\n   server.tag = &#8220;lighttpd&#8221;<br \/>\n   server.pid-file =  &#8220;\/var\/run\/lighttpd.pid&#8221;<br \/>\n   server.errorlog             = &#8220;\/var\/log\/lighttpd\/error.log&#8221;<br \/>\n   include &#8220;conf.d\/access_log.conf&#8221;<br \/>\n   index-file.names += (<br \/>\n    &#8220;index.html&#8221;, &#8220;index.htm&#8221;, &#8220;index.php&#8221;<br \/>\n   )<br \/>\n   include &#8220;conf.d\/mime.conf&#8221;<\/p>\n<p>6. module.conf<br \/>\n   server.modules = (<br \/>\n  &#8220;mod_access&#8221;,<br \/>\n  &#8220;mod_fastcgi&#8221;,<br \/>\n  &#8220;mod_h264_streaming&#8221;,<br \/>\n  &#8220;mod_flv_streaming&#8221;,<br \/>\n  &#8220;mod_rewrite&#8221;,<br \/>\n  &#8220;mod_auth&#8221;,<br \/>\n  )<br \/>\n  h264-streaming.extensions = ( &#8220;.mp4&#8221; )<br \/>\n  flv-streaming.extensions = ( &#8220;.flv&#8221; ) <\/p>\n<p>7. Setup vhost<br \/>\n  There&#8217;re many samples out there for this part already, so I won&#8217;t write any here.<\/p>\n<p>8. FCGI<br \/>\n  I had FCGI installed in advance. To have lighttpd uses FCGI, edit<\/p>\n<p>  conf.d\/fastcgi.conf <\/p>\n<p>  fastcgi.server = (<br \/>\n  &#8220;.php&#8221; =><br \/>\n  (( &#8220;host&#8221; => &#8220;127.0.0.1&#8221;,<br \/>\n     &#8220;port&#8221; => 81,<br \/>\n     &#8220;bin-path&#8221; => &#8220;\/usr\/local\/bin\/php&#8221;<br \/>\n  )),<br \/>\n  )<br \/>\n9. restart lighttpd<br \/>\n  Then you can see the lighttpd started fcgi process<\/p>\n<p>10. Use jwplayer<br \/>\n  download mediaplayer.zip<br \/>\n  unzip it and copy &#8220;jwplayer.js&#8221;  and &#8220;player.swf&#8221; to a folder under docroot of the site<br \/>\n  check the &#8220;JW Player Quick Start Guide.pdf&#8221; in the zip file for how to use javascript to embed jwplayer to stream.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lighttpd is said that much lighter that Apache. I tried to set it up for flv and H.264 streaming. The configuration is relatively easy. 1. Download lighttpd-1.4.29.tar.gz 2. Download lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz (This is the patch for mod_h264) 3. Open tar ball &hellip; <a href=\"http:\/\/www.lalife.net\/?p=651\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,16],"tags":[],"class_list":["post-651","post","type-post","status-publish","format-standard","hentry","category-linux-command","category-it-memo"],"_links":{"self":[{"href":"http:\/\/www.lalife.net\/index.php?rest_route=\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.lalife.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.lalife.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.lalife.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.lalife.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=651"}],"version-history":[{"count":1,"href":"http:\/\/www.lalife.net\/index.php?rest_route=\/wp\/v2\/posts\/651\/revisions"}],"predecessor-version":[{"id":1895,"href":"http:\/\/www.lalife.net\/index.php?rest_route=\/wp\/v2\/posts\/651\/revisions\/1895"}],"wp:attachment":[{"href":"http:\/\/www.lalife.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.lalife.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.lalife.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}