Re: [vserver] Newbei's questions

From: Corey Wright <undefined_at_pobox.com>
Date: Thu 24 Apr 2008 - 14:46:14 BST
Message-Id: <20080424084614.e0728adf.undefined@pobox.com>

On Thu, 24 Apr 2008 20:34:10 +0800 (CST)
Stephen Liu <satimis@yahoo.com> wrote:

> > As mentioned earlier in the thread, reverse proxying will let you do
> > this.
> > Just designate the one with the highest load to be the reverse proxy,
> > send
> > all traffic there, and have that proxy requests for the other server.
> > Configuration depends on the server, your setup, etc.
>
>
> Sorry I overlooked this point before. I can't figure out how to do it.
> Could you please shed me some light. Pointer would be appreciated.

if using apache2, then this [1] is the definitive guide to reverse proxying
(well, besides the mod_proxy documentation [2] itself, but it's not really
a "guide").

i use reverse proxying to create a unified namespace (http://server/app1 ->
http://guest1/app1 & http://server/app2 -> http://guest2/app2), mainly
because i only have a single external ip address.

there are other proxies and web servers that can supposedly do reverse
proxying (squid, pound, lighttpd, etc), but they:
1. poorly document reverse proxying
2. seem to be more tailored towards load balancing than general reverse
proxying (or at least the documentation is)
3. are not as featureful as apache2 (rewriting links, headers, etc)
4. are not apache2 ;-) (which i was already familiar with and using for web
apps)

a reverse proxy configuration can be as simple as (assuming no rewriting):

<Location /app1>
  ProxyPass http://guest1/app1
  ProxyPassReverse http://guest1/app1
</Location>
<Location /app2>
  ProxyPass http://guest2/app2
  ProxyPassReverse http://guest2/app2
</Location>

my apache2 reverse proxy runs in a vserver guest and proxies for a bunch of
different web applications (php, python, java) and static file stores, each
in its own guest. my reverse proxy even does encryption (ssl/tls) and
compression (gzip) for all the proxied servers, because some of them don't
support those features and to centralize those features' configuration.

just some ideas to maximize your use of vservers with reverse proxying.

[1] http://www.apachetutor.org/admin/reverseproxies
[2] http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

corey

-- 
undefined@pobox.com
Received on Thu Apr 24 22:18:09 2008
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 24 Apr 2008 - 22:18:20 BST by hypermail 2.1.8