I am not sure I understand so I apologize if the answer is incomplete.

I do not know what mdp_proxy_html does vs mod_proxy.

mod_proxy is required if you want to have another database server run
as a proxy, but its job is not to rewrite URL, although you can do
that.

You can also have web2py rewrite URL using routes.py (an example in
routes.example.py).

routes supports both url mapping (routes_in) and reverse url mapping
(routes_out) and if they match there is no problem. routes.py does not
parse the generated for urls. So you should not do this:

  jQuery(document).ready(function(){ setTimeout("keepalive('/yourapp/
default/action')",10000); });

You should do this instead

  jQuery(document).ready(function(){ setTimeout("keepalive('{{=URL
('yourapp','default','action')}})'",10000); });

Anyway I have a feeling you know about this more than I do. If you can
propose any impeovement to the current mechanism, please let us know.

Massimo

On Apr 22, 5:41 am, Bernd das Brot <b.b...@gmx.at> wrote:
> Hi web2py fans !
>
> I want to use web2py (current production version 1.61.1) behind an
> apache proxy, alongside other applications.
> Therefore I need a unique URL-Prefix to guide mod_proxy to the
> (standalone) web2py-Server
> (Application "cookbook":https://server:port/prefix/cookbook/...)
>
> 1) I followed the instructions in the FAQs using "mod_proxy_html" and
> it kind-of-works:
>     it rewrites URLs like "<a href="/cookbook/..>" to <a href="/prefix/
> cookbook/">" BUT
>     in Javascript it does not understand things like
>
>     jQuery(document).ready(function(){ setTimeout("keepalive('/admin/
> default/keepalive')",10000); });
>
>    and therefore does not rewrite it. Result: no editor-Keepalive, but
> (after 10 seconds) an red text
>    "Communication Error".
>
>   How can I fix this in mod_proxy_html (No, I do not want to hardcode
> it into the framework) ?
>
> 2) Can somebody with deeper knowledge of web2py explain, why I need
> mod_proxy_html anyway ?
>
>     IMHO the use of mod_proxy_html is a workaround for something a
> decent framework should do.
>     "route.py" does "half" of it but "breaks your application" (!):
>     The "URL()" function does not use the variables from "route.py",
> so the absolute URLs
>     (in page code and in javascript) are not proxy-aware (but could be
> - I don't think that this is
>     too hard).
>
>     Thanks for any replies, Bernd
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to