You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nick Rudnick <jo...@t-online.de> on 2011/02/11 22:52:25 UTC
[users@httpd] Reverse Proxying to 2 backends, how to keep the URL-directory prefix
having relative paths?
Dear all,
googling didn't do the trick so here my question. Reverse proxying two
backends by
ProxyPass /app http://127.0.0.1:4444
ProxyPassReverse /app http://127.0.0.1:4444
ProxyPass /wiki http://127.0.0.1:7777
ProxyPassReverse /wiki http://127.0.0.1:7777
I run into problems with the second backend, as its relative paths lack
the wiki/ prefix.
Rewriting isn't a good idea, as the wiki pages' paths don't have
prefixes, i.e. href="WikiPageName".
Interestingly, with the first backend I got relative paths running fine
after eliminating leading slashes.
Is there a more elegant solution to this than modifying the wiki backend
so that it writes href="wiki/WikiPageName" etc. everywhere?
Thank you a lot in advance,
Nick
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Reverse Proxying to 2 backends, how to keep the
URL-directory prefix having relative paths?
Posted by Nick Rudnick <jo...@t-online.de>.
Hi Devrai,
if you have a similar setup, maybe you don't need substituting at all --
it works fine without, when I take a clone of my first backend.
Cheers, Nick
On 02/12/2011 06:10 AM, Devraj Mukherjee wrote:
> On Sat, Feb 12, 2011 at 1:57 PM, Nick Kew<ni...@webthing.com> wrote:
>> On Fri, 11 Feb 2011 22:52:25 +0100
>> Nick Rudnick<jo...@t-online.de> wrote:
>>
>>
>>> I run into problems with the second backend, as its relative paths lack
>>> the wiki/ prefix.
>> http://www.apachetutor.org/admin/reverseproxies
>>
> That article uses mod_proxy_html to rewrite URLs in the page body.
>
> I have a similar setup and now use mod_substitute to do the same
> thing. Much simpler and don't have to build the module separately (not
> that its difficult). Upgrades are easier.
>
> I prefer modules distributed as part of the Apache core.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See<URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Reverse Proxying to 2 backends, how to keep the
URL-directory prefix having relative paths?
Posted by Nick Rudnick <jo...@t-online.de>.
Thanks a lot, but I am afraid that, in my case, *anything* can appear in
the relative path, as it's a wiki and there is no prefix.
My guess is the following:
As is works for the first backend, this shows that Server/Browser *can*
'remember' where to send a relative path to -- I guess by response
parameters. So, although two hrefs in *.html files of two different
backends a.net, b.net may be identical -- say 'page.html', the browser
will glue it
a.net ++ / ++ page.html -> a.net/page.html
b.net ++ / ++ page.html -> b.net/page.html
To my impression, mod_proxy_html & mod_substitute replace the *relative
href path* part, i.e.,
a.net ++ / ++ wiki/page.html
as explained, this is problematic.
What I am rather looking for is a substitution of the *response
parameter path*, i.e.,
a.net/wiki ++ / ++ page.html
As this appears much simpler, I guess it might exist. Any ideas?
Thanks a lot, again,
Nick
On 02/12/2011 06:10 AM, Devraj Mukherjee wrote:
> On Sat, Feb 12, 2011 at 1:57 PM, Nick Kew<ni...@webthing.com> wrote:
>> On Fri, 11 Feb 2011 22:52:25 +0100
>> Nick Rudnick<jo...@t-online.de> wrote:
>>
>>
>>> I run into problems with the second backend, as its relative paths lack
>>> the wiki/ prefix.
>> http://www.apachetutor.org/admin/reverseproxies
>>
> That article uses mod_proxy_html to rewrite URLs in the page body.
>
> I have a similar setup and now use mod_substitute to do the same
> thing. Much simpler and don't have to build the module separately (not
> that its difficult). Upgrades are easier.
>
> I prefer modules distributed as part of the Apache core.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See<URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Reverse Proxying to 2 backends, how to keep the
URL-directory prefix having relative paths?
Posted by Devraj Mukherjee <de...@gmail.com>.
On Sat, Feb 12, 2011 at 1:57 PM, Nick Kew <ni...@webthing.com> wrote:
> On Fri, 11 Feb 2011 22:52:25 +0100
> Nick Rudnick <jo...@t-online.de> wrote:
>
>
>> I run into problems with the second backend, as its relative paths lack
>> the wiki/ prefix.
>
> http://www.apachetutor.org/admin/reverseproxies
>
That article uses mod_proxy_html to rewrite URLs in the page body.
I have a similar setup and now use mod_substitute to do the same
thing. Much simpler and don't have to build the module separately (not
that its difficult). Upgrades are easier.
I prefer modules distributed as part of the Apache core.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Reverse Proxying to 2 backends, how to keep the
URL-directory prefix having relative paths?
Posted by Nick Kew <ni...@webthing.com>.
On Fri, 11 Feb 2011 22:52:25 +0100
Nick Rudnick <jo...@t-online.de> wrote:
> I run into problems with the second backend, as its relative paths lack
> the wiki/ prefix.
http://www.apachetutor.org/admin/reverseproxies
--
Nick Kew
Available for work, contract or permanent.
http://www.webthing.com/~nick/cv.html
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org