|
/
Zope
/
Apsis
/
Pound Mailing List
/
Archive
/
2004
/
2004-07
/
Problem setting up reverse proxy
[
Pound performance under RH8, RH9, Debian Sid / ... ]
[
bogus BackEnd dead and resurrect messages / spoke ... ]
Problem setting up reverse proxy
"Patrick Reijnen" <patrickr(at)patrickr.xs4all.nl> |
2004-07-09 22:08:59 |
[ FULL ]
|
Hi guys,
For the last one and a half week I'm bumping my head into correctly
configuring my reverse proxy based on pound, but to be honest, I'm stuck
at the moment.
My situation:
I have one official internet ip-address (adsl connections), I've
registered a domainname (famreijnen.nl) and created two dns entries
(www.famreijnen.nl and camera1.famreijnen.nl) which both point to my
official internet ip-address (ie. both have the same ip-address).
Then I configured pound like:
#start config
ListenHTTP 213.84.107.124,80 # external ip address
ListenHTTP 192.168.1.1,80 # intranet
ExtendedHTTP 1 # think I don't need this
LogLevel 2
# MaxRequest 200
UrlGRoup ".*/forum"
BackEnd 192.168.1.2,81,1
EndGroup
UrlGRoup "http://camera1.famreijnen.nl.*"
HeadRequire Host ".*camera1.famreijnen.nl.*"
BackEnd 192.168.1.6,82,1
EndGroup
UrlGRoup ".*"
BackEnd 127.0.0.1,80,1
EndGroup
# end config
http://www.famreijnen.nl/forum
seems to work fine sofar (1st urlgroup)
http://www.famreijnen.nl/<everything
else> is redirected to my default web
server (last urlgroup)
http://camera1.famreijnen.nl goes to
the default web server (last
urlgroup) instead of being handled by the second urlgroup.
Pound logs thios when I try to go to http://camera1.famreijnen.nl:
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET / HTTP/1.0 - HTTP/1.1 304
Not Modified (127.0.0.1:80)
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET /gifs/Logo-small.png
HTTP/1.0 - HTTP/1.1 304 Not Modified (127.0.0.1:80)
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET /gifs/adsl4linux.jpg
HTTP/1.0 - HTTP/1.1 304 Not Modified (127.0.0.1:80)
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET /gifs/poweredby.png
HTTP/1.0 - HTTP/1.1 304 Not Modified (127.0.0.1:80)
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET /gifs/apache_pb.gif
HTTP/1.0 - HTTP/1.1 304 Not Modified (127.0.0.1:80)
The definition of this second urlgroup has seen some variants sofar,
either with or without a HeadRequire line and the UrlGRoup itself has seen
there variants:
UrlGRoup "http://camera1.famreijnen.nl.*"
UrlGRoup ".*camera1.famreijnen.nl.*"
UrlGRoup ".*camera1.*"
For now I don't want to handle https traffic with pound.
Can somebody please shine the light for me??? Guess I'm overlooking
something somewhere, but what ????
Thanks,
Patrick Reijnen
|
|
|
RE: Problem setting up reverse proxy
John D <jwdavid(at)ibizvision.com> |
2004-07-09 22:19:19 |
[ FULL ]
|
Patrick,
If I am reading what you are saying correctly, then all you have to do is make
your second UrlGroup:
UrlGroup ".*"
Make sure you leave your HeadRequire as that is what does the "magic".
John D.
********** Original Email *********
** To: pound(at)apsis.ch
** From: "Patrick Reijnen" <patrickr(at)patrickr.xs4all.nl>
** Date: Fri, 9 Jul 2004 22:08:59 +0200 (CEST)
**********
Hi guys,
For the last one and a half week I'm bumping my head into correctly
configuring my reverse proxy based on pound, but to be honest, I'm stuck
at the moment.
My situation:
I have one official internet ip-address (adsl connections), I've
registered a domainname (famreijnen.nl) and created two dns entries
(www.famreijnen.nl and camera1.famreijnen.nl) which both point to my
official internet ip-address (ie. both have the same ip-address).
Then I configured pound like:
#start config
ListenHTTP 213.84.107.124,80 # external ip address
ListenHTTP 192.168.1.1,80 # intranet
ExtendedHTTP 1 # think I don't need this
LogLevel 2
# MaxRequest 200
UrlGRoup ".*/forum"
BackEnd 192.168.1.2,81,1
EndGroup
UrlGRoup "http://camera1.famreijnen.nl.*"
HeadRequire Host ".*camera1.famreijnen.nl.*"
BackEnd 192.168.1.6,82,1
EndGroup
UrlGRoup ".*"
BackEnd 127.0.0.1,80,1
EndGroup
# end config
http://www.famreijnen.nl/forum
seems to work fine sofar (1st urlgroup)
http://www.famreijnen.nl/<everything
else> is redirected to my default web
server (last urlgroup)
http://camera1.famreijnen.nl goes to
the default web server (last
urlgroup) instead of being handled by the second urlgroup.
Pound logs thios when I try to go to http://camera1.famreijnen.nl:
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET / HTTP/1.0 - HTTP/1.1 304
Not Modified (127.0.0.1:80)
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET /gifs/Logo-small.png
HTTP/1.0 - HTTP/1.1 304 Not Modified (127.0.0.1:80)
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET /gifs/adsl4linux.jpg
HTTP/1.0 - HTTP/1.1 304 Not Modified (127.0.0.1:80)
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET /gifs/poweredby.png
HTTP/1.0 - HTTP/1.1 304 Not Modified (127.0.0.1:80)
Jul 9 22:06:20 bambi pound: 213.84.107.124 GET /gifs/apache_pb.gif
HTTP/1.0 - HTTP/1.1 304 Not Modified (127.0.0.1:80)
The definition of this second urlgroup has seen some variants sofar,
either with or without a HeadRequire line and the UrlGRoup itself has seen
there variants:
UrlGRoup "http://camera1.famreijnen.nl.*"
UrlGRoup ".*camera1.famreijnen.nl.*"
UrlGRoup ".*camera1.*"
For now I don't want to handle https traffic with pound.
Can somebody please shine the light for me??? Guess I'm overlooking
something somewhere, but what ????
Thanks,
Patrick Reijnen
|
|
|
RE: Problem setting up reverse proxy
"Patrick Reijnen" <patrickr(at)patrickr.xs4all.nl> |
2004-07-10 11:44:11 |
[ FULL ]
|
Hi John,
Thanks for the answer. Changed the second urlgroup the way you suggested,
restarted pound and had no luck..... It still goes to my default
website...
Patrick
[...]
|
|
|
Re: Problem setting up reverse proxy
Hrvoje Husic <pound(at)cgn.toonster.de> |
2004-07-10 12:16:44 |
[ FULL ]
|
Patrick Reijnen schrieb am Samstag, 10. Juli 2004:
[...]
This should actually work:
UrlGroup ".*"
HeadRequire Host "camera1.famreijnen.nl:80"
BackEnd 192.168.1.6,82,1
EndGroup
[...]
|
|
|
Re: Problem setting up reverse proxy
"Patrick Reijnen" <patrickr(at)patrickr.xs4all.nl> |
2004-07-10 15:49:30 |
[ FULL ]
|
This answer still doesn't give a working situation, but it actually does
change the pound logging to:
Jul 10 15:44:00 bambi pound: 213.84.107.124 GET / HTTP/1.0 - HTTP/1.0 304
Not Modified (192.168.1.6:82)
Jul 10 15:44:00 bambi pound: 213.84.107.124 GET /gifs/Logo-small.png
HTTP/1.0 - HTTP/1.0 404 Not Found (192.168.1.6:82)
Jul 10 15:44:00 bambi pound: 213.84.107.124 GET /gifs/adsl4linux.jpg
HTTP/1.0 - HTTP/1.0 404 Not Found (192.168.1.6:82)
Jul 10 15:44:00 bambi pound: 213.84.107.124 GET /gifs/apache_pb.gif
HTTP/1.0 - HTTP/1.0 404 Not Found (192.168.1.6:82)
Jul 10 15:44:00 bambi pound: 213.84.107.124 GET /gifs/poweredby.png
HTTP/1.0 - HTTP/1.0 404 Not Found (192.168.1.6:82)
It still presents the index page of my default website, but it somehow
tries to get the images on it from the correct website (if I understand
these messages correctly), while these images can only be found at the
default website ........
Patrick
[...][...][...]
|
|
|
Re: Problem setting up reverse proxy
Hrvoje Husic <pound(at)cgn.toonster.de> |
2004-07-10 16:12:28 |
[ FULL ]
|
Patrick Reijnen schrieb am Samstag, 10. Juli 2004:
[...]
You should check you backend server, that it does serve from the right
document-root. According to the logs pound does pass through the
request to the server you want.
[...]
If the images for your special site are found on the default, you have
to add another config, so that the special-images are also fetched
from the default site.
Looks like you are falling over the complexity of your site-setup.
If you only want to fetch the startpage from the special setup, you
might change the according (that it 2nd) UrlGroup to something like
this:
UrlGroup "/(special1|special2)?"
This would serve http://server/ and http://server/special1 or
http://server/special2 pages from you
special server, while fetching
the rest from the defaul server.
You should consult "man regex" for more detailed information of how to
tune pound in this case.
[...]
|
|
|
Re: Problem setting up reverse proxy
"Patrick Reijnen" <patrickr(at)patrickr.xs4all.nl> |
2004-07-10 20:24:52 |
[ FULL ]
|
Thanks for your answer. To start with the point on the images:
The images of the special site should NOT come from my default site. They
should come from the special site itself.
The special site is a Linux webserver embedded in a piece of hardware. I
have some control over it but not too much.
Looking around a bit in the sources of that webserver, I maybe found my
problem, but as I'm not sure about it, can somebody please acknowledge or
deny my next thoughts:
http://camera1.famreijnen.nl
actually should start
http://camera1.famreijnen.nl/index.shtml
as that's the main page of that
website.
This index.shtml file contains next lines:
<META HTTP-EQUIV="Expires" CONTENT="Tue, 01 Jan 1980 1:00:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=/view/view.shtml">
Can it be that the last line with the "Refresh" is causing my problems ???
If yes, is there a way around??
Your help is appreciated,
Patrick
[...][...][...]
|
|
|
Re: Problem setting up reverse proxy
Hrvoje Husic <pound(at)cgn.toonster.de> |
2004-07-10 20:38:01 |
[ FULL ]
|
Re: Problem setting up reverse proxy
"Patrick Reijnen" <patrickr(at)patrickr.xs4all.nl> |
2004-07-10 21:20:55 |
[ FULL ]
|
Blush....... It works for me too now.....
Guess I ran into something called browser caching......
Anyway: thanks a lot for the help and keep on going with this nice program.
Patrick
[...][...][...]
|
|
|
|