FAQ
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

Search Discussions

  • Nick Kew at Feb 12, 2011 at 2:57 am

    On Fri, 11 Feb 2011 22:52:25 +0100 Nick Rudnick 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
  • Devraj Mukherjee at Feb 12, 2011 at 5:10 am

    On Sat, Feb 12, 2011 at 1:57 PM, Nick Kew wrote:
    On Fri, 11 Feb 2011 22:52:25 +0100
    Nick Rudnick 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
  • Nick Rudnick at Feb 12, 2011 at 10:46 am
    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 Kewwrote:
    On Fri, 11 Feb 2011 22:52:25 +0100
    Nick Rudnickwrote:

    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
  • Nick Rudnick at Feb 12, 2011 at 1:50 pm
    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 Kewwrote:
    On Fri, 11 Feb 2011 22:52:25 +0100
    Nick Rudnickwrote:

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriesapache
postedFeb 11, '11 at 9:53p
activeFeb 12, '11 at 1:50p
posts5
users3
websitehttpd.apache.org
irc#httpd

People

Translate

site design / logo © 2022 Grokbase