You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modproxy-dev@apache.org by Jan Vicherek <ap...@ied.com> on 2001/04/15 19:51:27 UTC

forward / tunnel / masquerade an HTTP request to another Host:Port based on ServerName/ServerAlias ?

 Hi,

   If there are other / better places to ask this question, please point
me. I didn't find this in any FAQs.

   I have two linux machines : machineA and machineB.

   Only machineA is connected to the internet, so I can only accept
connections from the internet on machineA port 80, machineB cannot be
connected directly to internet.

   I need to serve pages from machineA for setA of VirtualHosts and other
pages from machineB for setB of VirtualHosts.

   How do I tell apache on machineA : "If you receive a request for a host
from setB, do not process it in any way (maybe just add internet IP of
requestor), just forward that request to machineB:80 and relay the answer
from machineB back to the requestor. To requestor it will appear as if the
pages came from machineA, even though the contents will come from
machineB."

     Thanks,

          Jan

-- 
-- Gospel of Jesus is the saving power of God for all who believe --
               ## To some, nothing is impossible. ##
                     http://Honza.Vicherek.com/


Re: forward / tunnel / masquerade an HTTP request to another Host:Portbased on ServerName/ServerAlias ?

Posted by Graham Leggett <mi...@sharp.fm>.
Jan Vicherek wrote:

>    How do I tell apache on machineA : "If you receive a request for a host
> from setB, do not process it in any way (maybe just add internet IP of
> requestor), just forward that request to machineB:80 and relay the answer
> from machineB back to the requestor. To requestor it will appear as if the
> pages came from machineA, even though the contents will come from
> machineB."

Use mod_proxy's reverse proxy capability. On machine A, configure your
virtual hosts that you need to be accessible to the net. On each virtual
host, add the following config:

ProxyPass		/	http://machineB.virtual.host/
ProxyPassReverse	/	http://machineB.virtual.host/

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."