Dear Aleks,

Thank you for the information. We implemented your insights (i.e., http://blog.haproxy.com/2014/04/28/howto-write-apache-proxypass-rules-in-haproxy/). It only rewrites the URL in the address bar. The PHP application has internal hyperlinks in each page (see frameset, frame class in the code below) .

In the request generated by the application server, the /product1 in path is replaced with / by the PHP application. Those links need to be rewritten to work through HAProxy to make it accessible from outside. Here is an example of how internal links are being rewritten for proxy by Apache HTTP server: http://serverfault.com/questions/222823/phpapache-as-forward-reverse-proxy-how-to-process-client-requests-and-server-r?answertab=active#tab-top

This is same as what Apache server’s mod_proxy_html serves to:
rewrite <a href="http://appserver.example.com/foo/bar.html";>foobar</a>
to <a href="http://www.example.com/appserver/foo/bar.html";>foobar</a>.

We modified this solution (of Apache) to work with HAProxy, but did not succeed. Is there any insight anyone could provide?

+++++++++++
Internal Hyperlinks in our PHP page:
+++++++++++
<frameset rows="<?php echo
"$GLOBALS[logoBarHeight],$GLOBALS[titleBarHeight]" ?>,*" cols="*" frameborder="NO" border="0" framespacing="0"> <frame class="logobar" src="<?php echo $rootdir;?>/login/filler.php" name="Filler Top" scrolling="no" noresize frameborder="NO"> <frame class="titlebar" src="<?php echo $rootdir;?>/login/login_title.php" name="Title" scrolling="no" noresize frameborder="NO"> <frame src="<?php echo $rootdir;?>/login/login.php" name="Login" scrolling="auto" frameborder="NO">
</frameset>


Thank you.

Sincerely,

Susheel Jalali

www.Coscend.com
On 10/31/15 14:36, Aleksandar Lazic wrote:
Dear Susheel Jalali.

Am 31-10-2015 08:43, schrieb Susheel Jalali:
Dear HAProxy Developers:

[snipp]

This is same as what Apache server’s mod_proxy_html serves to:
rewrite <a href="http://appserver.example.com/foo/bar.html";>foobar</a>

to <a href="http://www.example.com/appserver/foo/bar.html";>foobar</a>.

Is there an output filter equivalent of Apache server’s mod_proxy_html
in HAProxy to rewrite internal links in:
(i) a PHP page?
(ii) an HTML page?

Assumption:

you use http://open-emr.org

conclusion:

http://www.open-emr.org/wiki/index.php/Apache2_Notes

follow up

http://blog.haproxy.com/2014/04/28/howto-write-apache-proxypass-rules-in-haproxy/

Have I assumed right and was you able to step forward?

BR Aleks




Reply via email to