title: lighttpd proxy server for school
body: <p>I am developing a video hosting site for use by teachers to distribute instructional screencast videos to their students. I http pseudo stream  flv files from a lighttpd server to embedded JW Players. All is working well with that. I also allow my teacher to embed selected YouTube content in their playerlists. Right now the JW Player just calls the videos directly from YouTube using the YouTube API. That works well too. The issue is when kids try to watch YouTube videos at school, the school’s filter blocks all YouTube content. My teacher’s have asked me to look into using my lighttph server as a proxy server for youtube to get around the filter. </p>
  
  <p>I have zero experience with proxies. I think I should be able to use the proxy module in lighttpd to make youtube.com “look like” mydomain.com to the school’s filter, I just don’t really know where to start. The other complication is that when the player calls a YouTube video, it get’s redirected to lots of other URLs some youtube.com and some other domains. Those all also need to be handled by the proxy.</p>
  
  <p>Can anyone provide any insight or advise? Is what I am trying to do reasonable? Can anyone provide any lighttpd configuration code examples that might jump start me? Thanks very much! I appreciate any and all suggestions.</p>
  
  <hr>
  
  <p>Thanks much for your advice! I think I may need to clarify what I am trying to do. </p>
  
  <p>The server that would be used as the proxy is outside the school’s network and it is unfiltered by the school. Its domain is “approved” for students use. I can download youtube to the server and stream for there. That does work and we do it. I would like to save disk space on the server by having it proxy youtube and deliver it to the school’s network “labeled” as coming from its own approved domain. Since I can already control the use of that domain, I will be able to control the youtube content that students can access with it. The idea is to give teachers the ability to selectively grant student access  around the filter. </p>
  
  <p>This is a huge limitation that teachers in many school districts face. Youtube has a tremendous amount of content that we could and should be using with our kids, but because there is also “inappropriate” content there, most school districts simply filter out all youtube access. </p>