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

Re: Forwarding documents from another web server on internal network

Tom Hibbert said:
> This will be my first post to debian-apache. Here goes!

Well it got this far ...

> I have one IP address and 2 machines that want to be webservers (one mine, 
> the other my flatmates.) What I'm thinking of doing is using Apache on my 
> machine as the main webserver, then for his subdomain somehow get Apache to 
> fetch documents from his machine (which is on a 192.168.* subnet), then 
> deliver them to the client.

It's called reverse proxying.  You use mod_proxy in Apache to establish
a proxy (on behalf of the Internet) to your flatmate's web server.

Assuming you have the apache-doc package installed (if not, why??) have
a look at doc/apache/manual/mod/mod_proxy.html for detailed information.
Look at the ProxyPass and ProxyPassReverse directives.  The mod_proxy
module is included in the Debian apache package by default (though not
enabled by default IIRC).  The [P] flag for the RewriteRule directive
could also be useful for you (see mod_rewrite.html in the same directory
as mod_proxy.html, above).  The rewrite engine is pretty powerful.  You
can find more helpful information on doing reverse proxying with the
rewrite engine in the doc/apache/manual/misc/rewriteguide.html file.

Have fun!


Andrew Shugg <andrew@neep.com.au>                   http://www.neep.com.au/

"Just remember, Mr Fawlty, there's always someone worse off than yourself."
"Is there?  Well I'd like to meet him.  I could do with a good laugh."

To UNSUBSCRIBE, email to debian-apache-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: