For anyone in the future trying to do this with Apache2 on Ubuntu:

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>



On Tuesday, November 5, 2013 11:51:11 AM UTC-5, DeanK wrote:
>
> I have an instance of web2py running on nginx sitting behind an apache 
> reverse proxy (soon to be nginx as well) so:
>
> www.mydomain.com/myapp        points to >>    myserver1.otherdomain.com
>
> i have /myapp/default/landing set as the default application, controller, 
> and function.  When i go directly to myserver1.otherdomain.com everything 
> is fine, but if i go to www.mydomain.com/myapp all of my static files are 
> unreachable because the relative paths point to 
> www.mydomain.com/myapp/static/file where really it would have to be 
> www.mydomain.com/myapp/myapp/static/file which is kind of ugly.  I am 
> using URL() to create relative links.
>
> I first though maybe the fact the the reverse proxy url and app names are 
> the same was confusing regex or whatever was doing the rewrites, but that 
> didn't seem to be the case.  I also started looking at routes.py and set 
> BASE = 'myapp'.  That made parts of my site work, but things like login 
> then didn't.
>
>
> Anyone have experience setting a web2py app up behind a reverse proxy? 
>  Thoughts? Thanks,
>
> Dean
>

-- 
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