Awesome.  I was trying to use mod_substitute to replace the url in the data 
tag but things weren't loading right.  Anthony's suggestions worked.  I'm 
going to do some more extensive testing, but at first glance it looks like 
that did the trick.  Thanks!



On Friday, November 15, 2013 10:44:34 AM UTC-5, Anthony wrote:
>
> Does it work if you add the following to your proxy_html.conf file:
>
> ProxyHTMLLinks        div             data-w2p_remote
>
>
> See 
> http://httpd.apache.org/docs/current/mod/mod_proxy_html.html#proxyhtmllinks
>  and 
> http://apache.webthing.com/svn/apache/filters/proxy_html/proxy_html.conf.
>
> Anthony
>
> On Thursday, November 14, 2013 6:46:42 PM UTC-5, DeanK wrote:
>>
>> I'm having trouble with a web2py site sitting behind an Apache2 reverse 
>> proxy that uses web2py's built in ajax capability.  The main domain server 
>> configuration is setup like this to point to the server running my web2py 
>> app:
>>
>> ProxyHTMLInterp On
>> LogLevel Debug
>> ProxyHTMLLogVerbose On
>> ProxyPass /link/ http://my.server.com/
>> ProxyPassReverse /link/ http://my.server.com/
>>
>> ProxyHTMLURLMap http://my.server.com /link/
>>
>> <Location /stem/>
>>    ProxyPassReverse /
>>    SetOutputFilter  proxy-html
>>    ProxyHTMLURLMap http://my.server.com /link/
>>    ProxyHTMLURLMap / /link/
>>    ProxyHTMLURLMap  /link/ /link/
>>    RequestHeader    unset  Accept-Encoding
>> </Location>
>>
>> So now if I go to http://maindomain.com/link/ it loads my web2py app 
>> from http://my.server.com
>>
>> With this configuration things more or less appear to work for http right 
>> now (i still need to sort out https).  The only issue is all of my ajax 
>> calls that use web2py's built in LOAD() function break.  I'm thinking this 
>> is because proxy_html doesn't recognize the ajax call in the html to 
>> rewrite it due to how web2py does things?
>>
>> view snippet:
>> ....
>>
>> <div id="project1">{{=LOAD('project','project_grid.load', 
>> ajax=True,ajax_trap=True,user_signature=True,target="project1")}}</div> 
>>
>> ....
>>
>>
>> html after proxy:
>> ...
>>
>> <div id="project1"><div data-w2p_remote="
>> /myapp/project/project_grid.load?_signature=f9f89cf781972e66ed34841f00c3250686653cbc"
>>  
>> id="project1">loading...</div></div> 
>>
>> ...
>>
>>
>> here if the url rewrite worked this should have pointed to 
>> /link/myapp/project/project_grid.load
>>
>>
>>
>> Anyone have any experience with this?  Is there somehow i can tell web2py 
>> to add the prefix for only the LOAD() methods or something? Thanks.
>>
>>
>>
>>
>>
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to