[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache ProxyPass and ModRewrite



On Fri, Feb 07, 2003 at 06:16:04PM -0200, GBV wrote:
| Hi all!
| 
| I´m using Apache mod_proxy to emulate a direct internet connection
| with one internal web host running ISS 5.0
| 
| internet -> debian/Apache -> w2k/ISS
| 
| httpd.conf - inside virtual host foo.com
| ProxyPass /universite/  http://125.129.0.69:80/
| 
| when the user goes to http://www.foo.com/universite/ he access the
| ISS web server in the internal network
| 
| but when the request returns from the ISS(sucks), the address is
| altered to  http://125.129.0.69 because a database link
| manipulation.
| 
| Can I use mod rewrite to solve this problem? And how?

Set ProxyPassReverse.

For example :

<VirtualHost 65.107.69.214:443>
    ServerName real.hostname
    # include a Via: header in the requests
    ProxyVia on
    ProxyRequests Off
    ProxyPass / http://localhost:9673/VirtualHostBase/https/real.hostname:443/finrpt/VirtualHostRoot/
    ProxyPassReverse / http://real.hostname:9673/
</VirtualHost>

That is from a machine running apache with mod_ssl and zope's zserver.
mod_proxy is used to front-end zope with apache's ssl capability.
Zope is set up to run ZServer (it's own HTTP server), thus ProxyPass
is used.  (in a new setup I would use PCGI instead but that's neither
here nor there)  Since zope will return URLs fully-qualified with its
hostname and port, the ProxyPassReverse setting allows that to be
reversed so the client can't tell (and links point to the right
location).

-D

-- 
What good is it for a man to gain the whole world, yet forfeit his
soul?  Or what can a man give in exchange for his soul?
        Mark 8:36-37
 
http://dman.ddts.net/~dman/

Attachment: pgppfXN1RO5Tj.pgp
Description: PGP signature


Reply to: