Friday, October 14, 2011

How to install web2py on a shared host

I'm working on a project with a friend using web2py
Free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python.
Official website

Now that we are ready to upload our website, we were looking for good shared host. It was not easy to find a good one. Finally we choose Site5 because it supports Python and the server is in Montreal.

how to install web2py on a shared host ?

I could find this website : web2py on shared hosting.
I followed the instructions from "Installing web2py".

When you do this, here is the url to see your app :

But what we wanted was something like that :

So here are the modifications :
- move all the web2py files directly to "public_html".
Before : $HOME/public_html/web2py/
After : $HOME/public_html/
(it's just an example with file, but you should move all the files!)

- edit $HOME/public_html/, your file should just contains :
routers = dict(
    BASE = dict(
  domains={'' : 'mySuperApp'},
*routers is a new feature of web2py. This parameter-based system first appeared in web2py version 1.92.1.
If you want to know which version of web2py you're using, just open the file $HOME/public_html/VERSION
And that's it ! Now you can access your application simply by using : !