Discussion:
I need a fool proof example of reverse proxy
JúlioMaranhão
2007-03-15 19:56:36 UTC
Permalink
Task:

I want to map
http://www.example.com:2040/mpds/login?nxp=/mpds/index
to
http://www.example.com/cvstrac
where
www.example.com is an intranet (all ports open) and internet (only port 80)
server (NAT server is another one) and
Apache 2.2.4 is controlling port 80 and
CVSTRAC program is controlling port 2040.

My last try was:

# BEGIN_CODE
ProxyRequests Off

<Proxy *>
Order allow,deny
Allow from all
</Proxy>

ProxyPass /cvstrac/ http://www.example.com:2040/
ProxyPassReverse /cvstrac/ http://www.example.com:2040/
ProxyPassReverseCookieDomain www.example.com:2040 www.example.com
ProxyPassReverseCookiePath / /cvstrack/

RewriteEngine On
RewriteRule ^/cvstrac$ /cvstrac/mpds/login?nxp=/mpds/index [R=permanent,L]
#END_CODE

So I am mixing the reverse proxy feature (mod_proxy, mod_proxy_connect and
mod_proxy_http on) and the mod_rewrite (mod_rewrite on).

The rewrite and reverse proxy seems to work (I can see the login page) but I
cannot login to CVSTRAC using the rewriten link:
http://www.example.com/cvstrac/mpds/login?nxp=/mpds/index
Maybe it is a cookie problem. The error is 404 (Not found). I just hit my
knowledge limit. :-)

Cheers.

Júlio

Loading...