you can use routes or router.

If you choose to use routes you create a file web2py/routes.py that
contains:

routes_in=[['/root/$anything','/$anything']]
routes_out=[['/$anything','/root/$anything']]

and "root" is your apache root.

Jonathan can explain the alternative router mechanism better than I
do.

Massimo



On Apr 6, 4:08 pm, mj <[email protected]> wrote:
> Is there a way to integrate web2py with a pre-existing Apache tree?
>  -- ie. configure web2py to not start at the context root
> ie. have web2py work fromhttp://myserver/w2p/application/controller/view
> instead of  http://myserver/application/controller/view
>
> I am starting from the default web2py ubuntu default install where
> setup-web2py-ubuntu.sh wiped out apache's
> config file to use mod_wsgi (/etc/apache2/sites-available/default)
>
> There is a line in that config where you can move web2py off the root
> context
>
> WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py
>
> But how does web2py know the document root so it can correctly build
> uri's via the URL()

Reply via email to