On Aug 21, 4:28 am, Mark Larsen <larsen...@gmail.com> wrote:
> > ==================================
> > ### setup WSGI
> > WSGIScriptAlias /apps /usr/local/web2py/current/wsgihandler.py
> > WSGIDaemonProcess web2py user=apache group=apache \
> >     home=/usr/local/web2py/current \
> >     processes=10 maximum-requests=500
>
> > <Directory /usr/local/web2py/current>
> >     Order allow,deny
> >     Allow from all
> > </Directory>
>
> > LogFormat "%h %l %u %t \"%r\" %>s %b" common
> > CustomLog /var/log/web2py_access.log common
> > ====================================
>
> I've had problems with this, serving web2py with mod_wsgi out of
> "non-root" on apache.
>
> If you just care about serving one app with web2py do this -->
>
>         WSGIScriptAlias /my_app /path/to/web2py/wsgihandler.py/my_app
>         <Directory "/path/to/web2py">
>                 Order allow,deny
>                 Allow from all
>                 WSGIProcessGroup web2py
>         </Directory>
>
> If you want to serve multiple apps do this (it rewrites the urls so
> they this the "app_directory" -->
>
>         RewriteEngine on
>         RewriteRule ^/my_app1(.*)$ /my_app_directory/my_app1$1 [PT,L]
>         RewriteRule ^/my_app2(.*)$ /my_app_directory/my_app2$1 [PT,L]
>
>        WSGIScriptAlias /my_app_directory /path/to/web2py/wsgihandler.py
>        <Directory "/path/to/web2py">
>               Order allow,deny
>               Allow from all
>               WSGIProcessGroup web2py
>         </Directory>

You don't need to use rewrite rules to do the latter, you can
generalise both to:

  WSGIScriptAliasMatch ^/(admin|welcome|examples)(/.*)?$ /path/to/
web2py/wsgihandler.py/$1$2

With this approach though, you have to modify the configuration every
time you add a new application.

That configuration has to be changed makes it unsuitable if
dynamically adding applications. This is where other configurations
which route everything into web2py which isn't static resource of
script file is better. You just need to know whether you want root web
page to be handled by web2py or not as that would change how it is
done.

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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