You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modproxy-dev@apache.org by Martijn Schoemaker <ma...@osp.nl> on 2002/07/29 14:37:57 UTC
Patch to mod_proxy for fixed reverse mapping support
Hi,
First of all, I would like to introduce myself. My name is
Martijn Schoemaker and I so programming/systemadmin/everything
*nix as my daytime job.
I am currently working at a big customer with a pretty complex
(too complex imho) proxy environment. This constists of
netscape proxies, ssl accelerators, netcache appliances, layer-4
switched and ofcourse apache proxies. In this environment we
use https at the frontend which is 'converted' to http requests
on the inside which are handled by the apache proxies. The problem
is that mod_proxy (as in apache 1.3.26) cannot reverse map to
urls outside it's own apache configuration. Because at different
places after the proxy, redirects are sent which need to be
rewritten to : https://fontend-address.com/<things> but because
mod_proxy uses the apache URL construction routines is not
possible (it will always map to http://<ServerName>/<rest>).
For this to be possible I created a small patch which does a
check on the 'fake' url if it contains a '://' and if so it
will use that as the first part and only pastes the additional
uri to that. If not, it just uses the apache url construction
routine as its default.
i.e. instead of a mapping like:
ProxyPassReverse /app/ http://internal-host:567/app
which will map to : http://<ServerName>/app/
it uses :
ProxyPassReverse https://frontend-address/app/
http://internal-host:567/app
which will map to the fixed URL supplied (the first part that is)
My question to you all is : am I making sense ? Can this be
incorporated in future releases ? As far as I can see this is
only added value and no other fake url will contain '://' unless
it is meant as fixed anyway.
I'd greatly appreciate any comments :)
Greetings,
Martijn Schoemaker
--
------ WARNING: This signature contains a VIRUS ! -------
- SHLRUIOHUIOWHLNNMSKHKDLWINDOWSJHFHKJLLUIHEKJLNDHKKJHL -
---------------------------------------------------------
Siteminder/mod_proxy issues
Posted by Martijn Schoemaker <ma...@osp.nl>.
Hi all,
I have the strangest results in an environment we use
at a customer.
We have an apache-server with mod_proxy on one node,
which forwards it's requests to another apache-server
with mod_proxy AND mod_sm from siteminder Netegrity.
Both apache servers are 1.3.26, pached with my previously
posted 'full reverse proxy' path, a siteminder patch (which
cannot be applied because the change seems to be in
standard 1.3.26 anyway) and a patch which removes spurious
line-feeds/carriage returns in the headers.
The strange thing is that some redirects from the application
(behind the 2nd proxy) work fine, others work only on IE6
browsers, others crash with a 'DNS error', and all netscapes
seem to display the redirect page without actually performing
the redirect.
The only strange thing I see in the sniffer logs (the redirects
are fine, no additional cr/lf's, no other strange things) is
that the siteminder cookies are set twice.
I afiak the duplication happens on the second proxy but I
cannot imagine why. Either there is a problem with the
mod_sm making it add the cookies and not replace if they
exist, or the mod_proxy duplicates the Set-Cookie headers.
I am completely baffled by this issue, and I don't have much
hair left on my head ;)
My question to y'all is :
1. Has anybody got this same config (using siteminder) ?
2. Does anybody know why the netscape browser does not
perform the redirect, except when I press 'reload' ?
3. Has anybody got a hint as to why Set-Cookie headers
might be duplicated ?
Thanks in advance,
Martijn Schoemaker
P.S.: Since this infrastucture is SSL on the front, and since
browsers nowadays don't support 'view response as-is'
anymore (let alone seeing the headers :() I do not have
the actual document 'seen' by the browser.
--
You have reached the end of the message.
Press [t] to go to the top of this message, or [c] to close it.
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Manon Goo <ma...@manon.de>.
--On Dienstag, 30. Juli 2002 9:28 Uhr -0700 Brian Degenhardt <bm...@mp3.com>
wrote:
> Nobody is forcing virtual host users to use the new functionality,
> they can still do path based ProxyPassReverse statements that will
> assume the virtual host's domain name. However, I think it would be
> unfortunate to disable this additional functionality to everybody in
> order to prevent virtual host users from misusing the new
> functionality.
True too ....
>
> -bmd
>
> On Tue, Jul 30, 2002 at 01:59:22PM +0200, Manon Goo wrote:
>> I do not think it is a good idea to be able to configure someting inside
>> a virtual host that tragets URLs outside it. This is fine in the
>> "server config" or in a _default_ virtual host but nowhere else.
>> especialy in enviroments whith many virtual hosts, vhost in diffrent
>> includefiles edited by different persons.
>>
>> Manon
>>
>>
>> --On Dienstag, 30. Juli 2002 13:16 Uhr +0200 Martijn Schoemaker
>> <ma...@osp.nl> wrote:
>>
>> > Hi,
>> >
>> > The new config will use the target specified in the
>> > config file 'as-is' and thus has no further link to
>> > any virtual host or internal configuration what so-
>> > ever.
>> >
>> > Greets,
>> > Martijn
>> >
>> > Manon Goo wrote:
>> >
>> >>> also.. what about virtual hosts.. doesn't requiring them to have a
>> >>> hostname break them?
>> >
>> > Doe the new config allow to target URLs outside of the scope of a
>> > virtual host directive if
>> > used within a virual host section ?
>> >
>> >>
>> >> There is no requirement to have a hostname - the old behaviour still
>> >> holds.
>> >>
>> >
>> >
>> > --
>> > ------ WARNING: This signature contains a VIRUS ! -------
>> > - SHLRUIOHUIOWHLNNMSKHKDLWINDOWSJHFHKJLLUIHEKJLNDHKKJHL -
>> > ---------------------------------------------------------
>> >
>>
>>
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Brian Degenhardt <bm...@mp3.com>.
Nobody is forcing virtual host users to use the new functionality,
they can still do path based ProxyPassReverse statements that will
assume the virtual host's domain name. However, I think it would be
unfortunate to disable this additional functionality to everybody in
order to prevent virtual host users from misusing the new
functionality.
-bmd
On Tue, Jul 30, 2002 at 01:59:22PM +0200, Manon Goo wrote:
> I do not think it is a good idea to be able to configure someting inside a
> virtual host that tragets URLs outside it. This is fine in the
> "server config" or in a _default_ virtual host but nowhere else. especialy
> in enviroments whith many virtual hosts, vhost in diffrent includefiles
> edited by different persons.
>
> Manon
>
>
> --On Dienstag, 30. Juli 2002 13:16 Uhr +0200 Martijn Schoemaker
> <ma...@osp.nl> wrote:
>
> > Hi,
> >
> > The new config will use the target specified in the
> > config file 'as-is' and thus has no further link to
> > any virtual host or internal configuration what so-
> > ever.
> >
> > Greets,
> > Martijn
> >
> > Manon Goo wrote:
> >
> >>> also.. what about virtual hosts.. doesn't requiring them to have a
> >>> hostname break them?
> >
> > Doe the new config allow to target URLs outside of the scope of a virtual
> > host directive if
> > used within a virual host section ?
> >
> >>
> >> There is no requirement to have a hostname - the old behaviour still
> >> holds.
> >>
> >
> >
> > --
> > ------ WARNING: This signature contains a VIRUS ! -------
> > - SHLRUIOHUIOWHLNNMSKHKDLWINDOWSJHFHKJLLUIHEKJLNDHKKJHL -
> > ---------------------------------------------------------
> >
>
>
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Manon Goo <ma...@manon.de>.
I do not think it is a good idea to be able to configure someting inside a
virtual host that tragets URLs outside it. This is fine in the
"server config" or in a _default_ virtual host but nowhere else. especialy
in enviroments whith many virtual hosts, vhost in diffrent includefiles
edited by different persons.
Manon
--On Dienstag, 30. Juli 2002 13:16 Uhr +0200 Martijn Schoemaker
<ma...@osp.nl> wrote:
> Hi,
>
> The new config will use the target specified in the
> config file 'as-is' and thus has no further link to
> any virtual host or internal configuration what so-
> ever.
>
> Greets,
> Martijn
>
> Manon Goo wrote:
>
>>> also.. what about virtual hosts.. doesn't requiring them to have a
>>> hostname break them?
>
> Doe the new config allow to target URLs outside of the scope of a virtual
> host directive if
> used within a virual host section ?
>
>>
>> There is no requirement to have a hostname - the old behaviour still
>> holds.
>>
>
>
> --
> ------ WARNING: This signature contains a VIRUS ! -------
> - SHLRUIOHUIOWHLNNMSKHKDLWINDOWSJHFHKJLLUIHEKJLNDHKKJHL -
> ---------------------------------------------------------
>
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Martijn Schoemaker <ma...@osp.nl>.
Hi,
The new config will use the target specified in the
config file 'as-is' and thus has no further link to
any virtual host or internal configuration what so-
ever.
Greets,
Martijn
Manon Goo wrote:
> >> also.. what about virtual hosts.. doesn't requiring them to have a
> >> hostname break them?
>
> Doe the new config allow to target URLs outside of the scope of a virtual
> host directive if
> used within a virual host section ?
>
> >
> > There is no requirement to have a hostname - the old behaviour still
> > holds.
> >
--
------ WARNING: This signature contains a VIRUS ! -------
- SHLRUIOHUIOWHLNNMSKHKDLWINDOWSJHFHKJLLUIHEKJLNDHKKJHL -
---------------------------------------------------------
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Manon Goo <ma...@manon.de>.
>> also.. what about virtual hosts.. doesn't requiring them to have a
>> hostname break them?
Doe the new config allow to target URLs outside of the scope of a virtual
host directive if
used within a virual host section ?
>
> There is no requirement to have a hostname - the old behaviour still
> holds.
>
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Graham Leggett <mi...@sharp.fm>.
Ian Holsman wrote:
> before you commit the change to 2.0 can you make sure that the existing
> behavior is still maintained/available, and if it can't be then you will
> need to make a new directive.
There is no change that I can see to existing behaviour (there was no
previous sane behaviour for ProxyPassReverse http://blah/ http://foo/)
> also.. what about virtual hosts.. doesn't requiring them to have a
> hostname break them?
There is no requirement to have a hostname - the old behaviour still holds.
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm
"There's a moon
over Bourbon Street
tonight..."
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Ian Holsman <Ia...@cnet.com>.
On Mon, 2002-07-29 at 12:14, Graham Leggett wrote:
> Ryan Bloom wrote:
>
> > I have no suggestion, but hasn't this already been done in 2.0? The
> > only problem with doing this in 1.3, is that we are unlikely to have
> > anymore 1.3 releases. We may be better off to just keep the patch on
> > the site.
>
> AFAIK v2.0 doesn't (does it?) - I was going to commit to v2.0, and then
> to v1.3 for completeness (even if there are no new versions of v1.3, at
> least it's there).
>
before you commit the change to 2.0 can you make sure that the existing
behavior is still maintained/available, and if it can't be then you will
need to make a new directive.
also.. what about virtual hosts.. doesn't requiring them to have a
hostname break them?
> Regards,
> Graham
> --
> -----------------------------------------
> minfrin@sharp.fm
> "There's a moon
> over Bourbon Street
> tonight..."
--
Ian Holsman
Performance Measurement & Analysis
CNET Networks
PH: 415-344-2608
RE: Patch to mod_proxy for fixed reverse mapping support
Posted by Ryan Bloom <rb...@covalent.net>.
Okay, you are right, I read the purpose of the patch incorrectly the
first time.
Ryan
----------------------------------------------
Ryan Bloom
rbb@covalent.net rbb@apache.org
> -----Original Message-----
> From: Graham Leggett [mailto:minfrin@sharp.fm]
> Sent: Monday, July 29, 2002 12:14 PM
> To: modproxy-dev@apache.org
> Subject: Re: Patch to mod_proxy for fixed reverse mapping support
>
> Ryan Bloom wrote:
>
> > I have no suggestion, but hasn't this already been done in 2.0? The
> > only problem with doing this in 1.3, is that we are unlikely to have
> > anymore 1.3 releases. We may be better off to just keep the patch
on
> > the site.
>
> AFAIK v2.0 doesn't (does it?) - I was going to commit to v2.0, and
then
> to v1.3 for completeness (even if there are no new versions of v1.3,
at
> least it's there).
>
> Regards,
> Graham
> --
> -----------------------------------------
> minfrin@sharp.fm
> "There's a moon
> over Bourbon Street
> tonight..."
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Graham Leggett <mi...@sharp.fm>.
Ryan Bloom wrote:
> I have no suggestion, but hasn't this already been done in 2.0? The
> only problem with doing this in 1.3, is that we are unlikely to have
> anymore 1.3 releases. We may be better off to just keep the patch on
> the site.
AFAIK v2.0 doesn't (does it?) - I was going to commit to v2.0, and then
to v1.3 for completeness (even if there are no new versions of v1.3, at
least it's there).
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm
"There's a moon
over Bourbon Street
tonight..."
RE: Patch to mod_proxy for fixed reverse mapping support
Posted by Ryan Bloom <rb...@covalent.net>.
> From: Graham Leggett [mailto:minfrin@sharp.fm]
>
> Martijn Schoemaker wrote:
>
> > i.e. instead of a mapping like:
> > ProxyPassReverse /app/ http://internal-host:567/app
> >
> > which will map to : http://<ServerName>/app/
> > it uses :
> >
> > ProxyPassReverse https://frontend-address/app/ http://internal-
> host:567/app
> >
> > which will map to the fixed URL supplied (the first part that is)
>
> Your suggested patch makes ProxyPassReverse work more logically. Will
> commit soon (unless there are objections).
I have no suggestion, but hasn't this already been done in 2.0? The
only problem with doing this in 1.3, is that we are unlikely to have
anymore 1.3 releases. We may be better off to just keep the patch on
the site.
Ryan
Re: Patch to mod_proxy for fixed reverse mapping support
Posted by Graham Leggett <mi...@sharp.fm>.
Martijn Schoemaker wrote:
> i.e. instead of a mapping like:
> ProxyPassReverse /app/ http://internal-host:567/app
>
> which will map to : http://<ServerName>/app/
> it uses :
>
> ProxyPassReverse https://frontend-address/app/ http://internal-host:567/app
>
> which will map to the fixed URL supplied (the first part that is)
Your suggested patch makes ProxyPassReverse work more logically. Will
commit soon (unless there are objections).
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm
"There's a moon
over Bourbon Street
tonight..."