[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Reverse proxy doc patch (ch05)

From: Cory Dodt <corydodt_at_yahoo.com>
Date: 2003-02-09 18:51:45 CET

Index: ch05.xml
===================================================================
--- ch05.xml (revision 4809)
+++ ch05.xml (working copy)
@@ -2033,6 +2033,74 @@
         Subversion gets that support for free.</para>
 
     </sect2>
+ <!--
***************************************************************** -->
+ <sect2 id="svn-ch-5-sect-4.6">
+ <title>Running Two Versions of Apache: Reverse Proxy</title>
+
+ <para>One especially useful feature of Apache is the ability to
act as
+ a Reverse Proxy; that is, a server that acts as a proxy to
another
+ server. This is especially useful for Subversion users who
need
+ to maintain an Apache1 site and an Apache2 site at the same
host
+ and port, so that applications that only run on Apache1 can
still
+ continue to run. In my real-world example, I needed to run
+ Bugzilla and Subversion at the same host and port.</para>
+
+ <para>Detailed information about this setup can be found at
+ <systemitem
+
class="url">http://httpd.apache.org/docs-2.0/mod/mod_proxy.html
+ </systemitem>. But here is a brief tutorial:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Set up Apache1 as normal, but in
+ <filename>httpd.conf</filename>, set
+ <literal>Port</literal> to 18080.</para>
+ </listitem>
+ <listitem>
+ <para>Set up Apache2 as you normally would. Apache2 will
be
+ our "main" server, getting requests at port 80, but
this
+ tutorial could also be done with Apache1 as the
server on
+ port 80, and the instructions would be almost
+ identical.</para>
+ </listitem>
+ <listitem>
+ <para>Ensure that Apache2 loads
<literal>mod_proxy</literal>.
+ Add the following to <filename>httpd.conf</filename>,
near
+ any other <literal>LoadModule</literal> statement (it
must
+ precede the commands in the next step).</para>
+
+ <screen>
+LoadModule proxy modules/mod_proxy.so
+</screen>
+ </listitem>
+ <listitem>
+ <para>In the <fielname>httpd.conf</filename> for Apache2,
set
+ up a reverse proxy with the following
directives:</para>
+ <screen>
+ProxyRequests off
+ProxyPass /bugzilla http://www.yourhost.org:18080/bugzilla
+ProxyPassReverse /bugzilla http://www.yourhost.org:18080/bugzilla
+ProxyPass /cgi-bin/bugzilla
http://www.yourhost.org:18080/cgi-bin/bugzilla
+ProxyPassReverse /cgi-bin/bugzilla
http://www.yourhost.org:18080/cgi-bin/bugzilla
+</screen>
+ <para>The first directive tells Apache2 that this server
is
+ not to be used as a forward proxy. In the second and
+ third directives, replace
<literal>/bugzilla</literal>
+ with the path to your application. The 4th and 5th
+ directives do the same for the cgi-bin (which is
where
+ bugzilla redirects you). If you only have one base
URL
+ that users connect to to reach your application, you
only
+ need one set of directives for each URL.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Your reverse proxy is now ready to go. Start both Apaches,
and
+ navigate to http://www.yourhost.org/. You should see the
start
+ page for Apache2, and be able to navigate to your Subversion
+ repository. Navigate to http://www.yourhost.org/bugzilla.
+ You should see your Bugzilla application running on
Apache1!</para>
+ </sect2>
+
   </sect1>
 
   <!--
******************************************************************* -->

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 9 18:52:27 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.