>From a practical point of view, I think it's not cost effective to
give one web2py clone to each user.  The reason is each web2py clone/
process takes a decent chunk of RAM.


On Jan 3, 10:43 pm, Graham Dumpleton <[email protected]>
wrote:
> Use daemon mode of mod_wsgi. Have a daemon process group per user with the
> user/group of the daemon process corresponding to that of the user whose
> web2py instance will run in that daemon process group. Then delegate each
> web2py instance to appropriate daemon process group.
>
> The only hard bit in this is that daemon process groups are statically
> defined and so to add new user, you need to update Apache configuration and
> restart Apache.
>
> For quick setup instructions for daemon mode of mod_wsgi read:
>
>  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegat...
>
> That example shows a daemon process group for whole virtual host, but it
> isn't limited to that and is flexible enough to do what you want.
>
> WSGIDaemonProcess default processes=2 threads=25
>
> <VirtualHost *:80>
> ServerNamewww.site.com
>
> WSGIDaemonProcess bob user=bob group=bob display-name=%{GROUP}
>
> <Directory /home/bob/www>
> Options ExecCGI
> AllowOverride FileInfo
> AddHandler wsgi-script .wsgi
> WSGIProcessGroup bob
> </Directory>
>
> WSGIDaemonProcess joe user=joe group=joe
>
> <Directory /home/joe/www>
> Options ExecCGI
> AllowOverride FileInfo
> AddHandler wsgi-script .wsgi
> WSGIProcessGroup joe
> </Directory>
>
> </VirtualHost>
>
> Graham
>
> On Tuesday, January 4, 2011 6:50:40 AM UTC+11, David Bain wrote:
>
> > I'm setting up a webserver that supports web2py, each user should have
> > their own web2py instance, hopefully everything will be deployed via
> > mod_wsgi.
>
> > This my goal:
> > Each user will be able to deploy their apps to their own 'www' folder on
> > the webserver
>
> > filesystem:
> > ~user/www/
>
> > for a <user> the web2py app would be available at:
> > http server:
> >https://example.com/<user>/examples/appadmin
> >https://example.com/<user>/admin
> >http://example.com/<user>/examples
>
> > *Nice to have would be a Cherokee based solution*
>
>

Reply via email to