|
Home > Archive > Perlbal > January 2006 > Perlbal as reverse proxy connection handler only
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Perlbal as reverse proxy connection handler only
|
|
| Fred Moyer 2006-01-22, 5: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
| |
| Ask Bjørn Hansen 2006-01-22, 5: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/
| |
| Fred Moyer 2006-01-22, 5: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
| |
| Ask Bjørn Hansen 2006-01-22, 5: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/
| |
| Fred Moyer 2006-01-22, 5: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.
|
|
|
|
|