Jump to content

using reverse proxy to access YouTube


adammw

Recommended Posts

Hi.

I am trying to create a reverse proxy to youtube, but am having problems with URL rewriting.

Does anyone know/have any rules for YouTube already?

I seem to be ok with the normal URLs (such as ones defined in <a> <img> etc. tags) but the real trouble is that many scripts refer to "http://www.youtube.com" or "/the_url_here" and this doesn't get re-written by my rules. I have tried ProxyHTMLExtended On, but this makes it worse, as it rewrites too much (e.g. the </a> tag becomes </my_url_to_the_reverse_proxy/a>.

 

My current server configuration is listed below (if it helps):

ProxyRequests Off
ProxyPass /secure-area/youtube/img-youtube/ http://img.youtube.com/
ProxyPass /secure-area/youtube/ http://www.youtube.com/
ProxyHTMLURLMap http://img.youtube.com /secure-area/youtube/img-youtube
ProxyHTMLURLMap http://www.youtube.com /secure-area/youtube
<Location /secure-area/youtube/img-youtube/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /secure-area/youtube/img-youtube/
ProxyHTMLURLMap /secure-area/youtube/img-youtube /secure-area/youtube/img-youtube
RequestHeader unset Accept-Encoding
</Location>
<Location /secure-area/youtube/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /secure-area/youtube/
ProxyHTMLURLMap /secure-area/youtube /secure-area/youtube
RequestHeader unset Accept-Encoding
</Location>


<Proxy *>
# I have added this to restrict my proxy to the local network, just in-case the "secure-area" isn't secure enough.
        Order Deny,Allow
Deny from all
Allow from 192.168.0
</Proxy>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.