|
Apache::ProxyRewrite - mod_perl URL-rewriting proxy |
Apache::ProxyRewrite - mod_perl URL-rewriting proxy
<Location /> SetHandler perl-script PerlHandler Apache::ProxyRewrite
PerlSetVar ProxyTo http://www.tivoli.com PerlSetVar ProxyAuthInfo "BASIC aGb2c3ewenQ6amF4szzmY3b=" PerlSetVar ProxyAuthRedirect On PerlSetVar ProxyRewrite "https://www.tivoli.com/secure => /secure" </Location>
<Location /secure> SetHandler perl-script PerlHandler Apache::ProxyRewrite
PerlSetVar ProxyTo https://www.tivoli.com/secure PerlSetVar ProxyAuthInfo "BASIC aGb2c3ewenQ6amF4szzmY3b=" PerlSetVar ProxyAuthRedirect Off PerlSetVar ProxyRewrite "http://www.tivoli.com/ => /" </Location>
Apache::ProxyRewrite acts as a reverse-proxy that will rewrite URLs embedded in HTML documents per apache configuration directives.
This module was written to allow multiple backend services with discrete URLs to be presented as one service and to allow the proxy to do authentication on the client's behalf.
The following variables can be defined within the configration of Directory, Location, or Files blocks.
The only trick is to remember to put double quotes around the configuration value if it contains whitespace and not to allow your text editor to wrap it to another line. You can use backslash as a continuation character if you find long lines a pain to read.
ServerName proxyhost
<Location /foo> PerlSetVar ProxyTo http://server1/A </Location>
The request for http://proxyhost/foo/B is proxied to http://server1/A/B. Within the response from server1 is an embedded URI /A/C. This URI is rewritten to /foo/C before being returned to the client.
This module is available via CPAN at http://www.cpan.org/modules/by-authors/id/C/CG/CGILMORE/.
Christian Gilmore <cag@us.ibm.com>
httpd(8), mod_perl(1)
Copyright (C) 2002, International Business Machines Corporation and others. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the terms of the IBM Public License.
|
Apache::ProxyRewrite - mod_perl URL-rewriting proxy |