Some of the information here may be outdated, please check the book instead
[edit]

if you have any experience with this please expand this page

web2py run on any hosting service that provides python2.5, even if they say they do not support it.

there are many possible configurations and you have to choose the most appropriate: - apache + mod_proxy (easiest way) - apache + mod_rewrite - apache + mod_wsgi (best way if you understand wsgi) - lighttpd + fcgi (fastest desployment configuration)

apache + mod_proxy

  • Start web2py from its own folder with (nohup will avoid that it does when you logout)

    nohup python2.5 web2py.py -p 8000 -a yourpassword &

  • configure apache to proxy port 8000. As an example here is my apache configuration http://mdp.cti.depaul.edu/AlterEgo/default/show/38.

apache + mod_rewite

  • Start web2py from its own folder with (nohup will avoid that it does when you logout)

    nohup python2.5 web2py.py -i yourip -p 8000 -a yourpassword &

  • configure apache to rewrite the request and use port 8000

apache + mod_wsgi

Read the wsgihandler.py file in the web2py folder

lightpd + fcgi

Read the fcgihandler.py file in the web2py folder

webfaction exception:

webfaction does not allow editing the apache config file but it requires going through their web based GUI. The easiest way to proceed it to use their GUI an empty cherrypy 3.0.0 project. After you create the project, use the shell to locate the newly created application folder. You will find a site.py that starts an empty cherry app (note that it contains an assigned port number). Edit this file as follows:

#!/bin/python2.5                                                                
from gluon.main import HttpServer
PORT=3221 ## The one in site.py
PASSWORD='whatever' server=HttpServer(ip='127.0.0.1',port=PORT,password=PASSWORD,pid_filename='pid')
server.start()

then copy web2py/* into the cherrypy app folder.

You may also want to read the experimental web2py installer for webfaction: http://forum.webfaction.com/viewtopic.php?id=1346

Let us know if you have trouble.

© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.