Perlbal as reverse proxy connection handler only
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Perlbal > Perlbal as reverse proxy connection handler only




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Perlbal as reverse proxy connection handler only  
Fred Moyer


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-22-06 10:46 PM

Hi,

I just took a stab at setting up Perlbal as a reverse proxy for use as a
connection pooling mechanism to my Apache server.  It worked for the
host domain of the server, but my Apache server uses several vhosts and
none of those were working properly.

I vaguely remember something on the list archives about Perlbal only
being an HTTP 1.0 proxy - is this still the case?  Or am I completely
missing something here?

Thanks in advance,

- Fred






[ Post a follow-up to this message ]



    Re: Perlbal as reverse proxy connection handler only  
Ask Bjørn Hansen


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-22-06 10:46 PM


On Jan 21, 2006, at 5:58 PM, Fred Moyer wrote:

> I just took a stab at setting up Perlbal as a reverse proxy for use
> as a connection pooling mechanism to my Apache server.  It worked
> for the host domain of the server, but my Apache server uses
> several vhosts and none of those were working properly.

You forgot to include the part of you email where you wrote what you
did, what you expected to happen and what actually happened.  :-)


- ask

--
http://askask.com/  - http://develooper.com/







[ Post a follow-up to this message ]



    Re: Perlbal as reverse proxy connection handler only  
Fred Moyer


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-22-06 10:46 PM

Ask Bj=F8rn Hansen wrote:
>=20
> On Jan 21, 2006, at 5:58 PM, Fred Moyer wrote:
>=20 
=20[vbcol=seagreen] 
>=20
> You forgot to include the part of you email where you wrote what you =20
> did, what you expected to happen and what actually happened.  :-)
>=20

I did indeed, my bad.  Thanks for calling me out on that Ask.  Below is=20
what I was going to send out to the list as a proper diagnosis, until I=20
figured out that that my virtual host configs were setup as <VirtualHost=20
*:80> and I neglected to change it to listen to 8080.  Perlbal is=20
working great as a reverse proxy now.  Time to take a break from the=20
computer 

Scenario:  I have an Apache heavy server running on port 80 on=20
app.redhotpenguin.com.

What I want to do:  I want to implement Perlbal as a reverse proxy to=20
proxy the requests back to the Apache server.  Perlbal will run on port=20
80 and Apache will run on port 8080.

What I did:  I changed 'Listen 80' in httpd.conf to 'Listen 8080'.  I=20
configured Perlbal with the following perlbal.conf [1] and started=20
perlbal and restarted apache.

What happened as a result: Requests to http://app.redhotpenguin.com were=20
successful.  Requests to other virtual hosts on my Apache server (such=20
as http://www.redhotpenguin.com returned a 404.

What I think is going on:  I think perlbal is sending HTTP 1.0 requests=20
to apache instead of HTTP 1.1 requests.  So Apache is handling all=20
requests with the default virtual host app.redhotpenguin.com.


CREATE POOL my_apaches
POOL my_apaches ADD 127.0.0.1:8080

CREATE SERVICE balancer
SET listen          =3D 0.0.0.0:80
SET role            =3D reverse_proxy
SET pool            =3D my_apaches
SET persist_client  =3D on
SET persist_backend =3D on
SET verify_backend  =3D on
ENABLE balancer






[ Post a follow-up to this message ]



    Re: Perlbal as reverse proxy connection handler only  
Ask Bjørn Hansen


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-22-06 10:46 PM


On Jan 21, 2006, at 6:32 PM, Fred Moyer wrote:

> What happened as a result: Requests to http://app.redhotpenguin.com
> were  successful.  Requests to other virtual hosts on my Apache
> server (such as http://www.redhotpenguin.com returned a 404.
>
> What I think is going on:  I think perlbal is sending HTTP 1.0
> requests to apache instead of HTTP 1.1 requests.  So Apache is
> handling all requests with the default virtual host
> app.redhotpenguin.com.

perlbal is forwarding the Host: HTTP header, so it's not that.

My best guess is that you specified your virtual hosts with something
like <virtualhost *:80> (instead of 8080) or some variation of
that.   (This summer I've used Apache for 10 years and I still
usually need a couple of tries to get the vhosts right when I setup
Apache with a fresh httpd.conf).

Do you use Apache 1 or 2?  If 1, then you should use "Listen 8080"
and "Port 80".


- ask

--
http://askask.com/  - http://develooper.com/







[ Post a follow-up to this message ]



    Re: Perlbal as reverse proxy connection handler only  
Fred Moyer


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-22-06 10:46 PM

> perlbal is forwarding the Host: HTTP header, so it's not that.
>
> My best guess is that you specified your virtual hosts with something
> like <virtualhost *:80> (instead of 8080) or some variation of
> that.   (This summer I've used Apache for 10 years and I still
> usually need a couple of tries to get the vhosts right when I setup
> Apache with a fresh httpd.conf).

That's exactly what happened.  I think it was mostly a case of being tire=
d
and not thinking clearly when I should have stepped away from the keyboar=
d
for a bit.  Which is also why I posted too quickly and without all the
necessary details.

> Do you use Apache 1 or 2?  If 1, then you should use "Listen 8080"
> and "Port 80".

This is Apache 2 - I'm only using Listen and it's been working fine with
just that directive and not Port.







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:16 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register