/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-06 / basic problem with request redirector

[ << ] [ >> ]

[ Problems with Pound 1.9 / "SANCHIZ CARRILLO ... ] [ Pound, OWA 2003, SSL and forms-based ... ]

basic problem with request redirector
Susan Roesner RZ <sroe0999(at)rz.uni-hildesheim.de>
2005-06-20 16:07:18 [ FULL ]
Hello,

I am new to pound and tried to do a basic config of pound 1.9 as request 
redirector.
On a Solaris 9 I have to seperate apache2 running, listening on two different 
ports with different ServerName but same IP-address. As both servers should be 
reached via port 80 I want to put pound in front so that it takes the request
on 
port 80 and redirects it to the correct server.

so my pound.cfg looks like this:
ListenHTTP *,80

# server1
UrlGroup ".*"
HeadRequire host "server1.domaine.de"
BackEnd 127.0.0.1,1080,1
EndGroup

server2
UrlGroup ".*"
HeadRequire host "server2.domaine.de"
BackEnd 127.0.0.1,8080,1
EndGroup

Problem I face, this config doesn't work. If I try to access 
http://server1.domaine.de I get the
error message 503. As far as I understand 
that indicate that pound doesn't find a backend apache listening on the needed 
port. BUT if I try to access http://server1.domain.de:1080 I get
the startsite 
of this server. So the server is defin. listening on this port.
Strange to me is: using HeadRequire as Virtual Host ->
".*server1.domaine.de.*" 
does work. 
Does anyone know where I make a mistake or is someone able to point me to a
good 
tutorial. I already tried to find the mistake reading man pages but still 
couldn't figure out what I' am doing wrong.

Thanks a lot for your help.

RE: [Pound Mailing List] basic problem with request redirector
"John D" <jwdavid(at)ibizvision.com>
2005-06-20 16:44:13 [ FULL ]
You are going to need to add the ".*" before and after your host names
(HeadRequire Host ".*server1.domaine.de.*"). This has little to do with
"virtual hosts" but is more related to what is contained in the "Host" header
field. The Host header often contains more then just the host name (the .*
matches any other stuff before and after the actual host name).

John D.

********** Original Email *********
** To:   pound(at)apsis.ch
** From: Susan Roesner RZ <sroe0999(at)rz.uni-hildesheim.de>
** Date: Mon, 20 Jun 2005 16:07:18 +0200 (CEST)
**********

Hello,

I am new to pound and tried to do a basic config of pound 1.9 as request 
redirector.
On a Solaris 9 I have to seperate apache2 running, listening on two different 
ports with different ServerName but same IP-address. As both servers should be 
reached via port 80 I want to put pound in front so that it takes the request
on 
port 80 and redirects it to the correct server.

so my pound.cfg looks like this:
ListenHTTP *,80

# server1
UrlGroup ".*"
HeadRequire host "server1.domaine.de"
BackEnd 127.0.0.1,1080,1
EndGroup

server2
UrlGroup ".*"
HeadRequire host "server2.domaine.de"
BackEnd 127.0.0.1,8080,1
EndGroup

Problem I face, this config doesn't work. If I try to access 
http://server1.domaine.de I get the
error message 503. As far as I understand 
that indicate that pound doesn't find a backend apache listening on the needed 
port. BUT if I try to access http://server1.domain.de:1080 I get
the startsite 
of this server. So the server is defin. listening on this port.
Strange to me is: using HeadRequire as Virtual Host ->
".*server1.domaine.de.*" 
does work. 
Does anyone know where I make a mistake or is someone able to point me to a
good 
tutorial. I already tried to find the mistake reading man pages but still 
couldn't figure out what I' am doing wrong.

Thanks a lot for your help.

[...]

Re: [Pound Mailing List] basic problem with request redirector
Robert Segall <roseg(at)apsis.ch>
2005-06-20 17:02:54 [ FULL ]
On Mon, 20 Jun 2005 16:07:18 +0200 (CEST) Susan Roesner RZ
<sroe0999(at)rz.uni-hildesheim.de> wrote:
[...]
request [...]
different [...]
should be [...]
request on [...]
understand [...]
the needed [...]
startsite [...]

On this port yes, but not on this address. You told Pound to connect
to the back-end at 127.0.0.1:1080 and not at server1.domain.de:1080. The
two are NOT the same.
[...]
".*server1.domaine.de.*" [...]

Yes. It's very likely that your browser sends something like

	Host: http://server1.domain.de
[...]

Re: [Pound Mailing List] basic problem with request redirector
Susan Roesner RZ <sroe0999(at)rz.uni-hildesheim.de>
2005-06-20 18:04:56 [ FULL ]
Hello,

thank you for your reply.
[...]
The apache server1 is listening on 127.0.0.1:1080 (tried "telnet localhost
1080" 
-> works). As telnet is able to connect to this interface and port, pound
should 
be able to do so as well, shouldn't it (its on the same machine)?

I also tried to use the public IP-Address (BackEnd x.x.x.x,1080,1) and on 
apacheconfig I wrote (Listen x.x.x.x:1080) but the error message is the same 
(503 Service Unavailable).

Best regard
S. Roesner

Re: [Pound Mailing List] basic problem with request redirector
Robert Segall <roseg(at)apsis.ch>
2005-06-21 13:33:57 [ FULL ]
On Mon, 20 Jun 2005 18:04:56 +0200 (CEST) Susan Roesner RZ
<sroe0999(at)rz.uni-hildesheim.de> wrote:
[...]
The[...]
localhost 1080" [...]
pound should [...]

Yes.
[...]
on [...]
the same [...]

As it was explained you have a bad HeadRequired directive. Fix it and
you should be OK.

In the future you may want to also post the log error message you see,
as it makes it simpler to understand what went wrong.[...]

MailBoxer