[ale] apache2 Proxypass

Chris Woodfield rekoil at semihuman.com
Tue Jul 17 14:09:40 EDT 2007

Even stranger, I tried fixing this by adding a RewriteRule, and that  
doesn't even seem to be working:

RewriteEngine           On
RewriteRule             ^tivo$  tivo/

Is my syntax correct here? The goal is to rewrite "http:// 
www.semihuman.com/tivo" to "http://www.semihuman.com/tivo/".


On Jul 17, 2007, at 12:54 PM, Jay Loden wrote:

> Chris Woodfield wrote:
>> Hi all...pardon my lack of apache-fu...
>> I've set up some ProxyPass directives on my apache2 server to
>> redirect a URL on my public webserver to the (hacked) web interface
>> on my tivo box behind it on the NAT network. So far everything seems
>> to work, almost...
>> The remaining niggling issue is that in order for the proxy
>> passthrough to be successful, I have to remember the trailing slash
>> on the URL. So far I haven't figured out how to get around that at
>> all, either. When I enter "http://www.semihuman.com/tivo/" into the
>> URL from the outside, I get the tivo web interface. When I enter
>> "http://www.semihuman.com/tivo", I get a 404.
>> Below is the content of the directives (which sits in a site file
>> under /etc/apache2/sites-available):
>> <Proxy *>
>> Order deny,allow
>> Allow from all
>> </Proxy>
>> ProxyRequests           Off
>> ProxyPass               /tivo/  http://tivo1.semihuman.com/
>> ProxyHTMLURLMap         http://tivo1.semihuman.com      /tivo
>> <Location /tivo/>
>>          ProxyPassReverse        /
>>          SetOutputFilter         proxy-html
>>          ProxyHTMLURLMap         /       /tivo/
>>          ProxyHTMLURLMap         /tivo   /tivo
>>          RequestHeader           unset   Accept-Encoding
>> </Location>
>> Now, I've tried changing the ProxyPass line from /tivo/ to /tivo, but
>> when I do that the URL without the slash comes up but none of the
>> links work (they map to http://www.semihuman.com/<file>, not http://
>> www.semihuman.com/tivo/<file>) Everything still works properly when I
>> add the slash to the URL.
>> Any ideas of how to make this work?
> Have you tried setting a redirect for /tivo to /tivo/ with  
> the .htaccess in the document root?
> http://httpd.apache.org/docs/1.3/misc/howto.html
> You could just redirect /tivo to /tivo/ using the .htaccess I'd think.
> Interestingly, my Apache server(s) redirect from /dirname to / 
> dirname/ anyway, but that might only work if the dirname is an  
> existing directory on disk, not sure. I'm not familiar with the  
> mod_proxy_html syntax, but this seems odd to me:
>>          ProxyHTMLURLMap         /       /tivo/
>>          ProxyHTMLURLMap         /tivo   /tivo
> Might that work if you just changed that second line to read
>           ProxyHTMLURLMap         /tivo   /tivo/
> -Jay
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale

More information about the Ale mailing list