web hosting on Dreamhost
[edit]Necessary steps:
- Install Python 2.5 by following this wiki page
- Install setuptools
- Run easy_install Flup
- Download and extract web2py
- Run python web2py.py to create the necessary framework files
- Create a file dispatch.fcgi at the root of web2py directory with the following content:
Code:
#!/home/youruserhere/run/bin/python
import sys
from flup.server.fcgi_fork import WSGIServer
import gluon.main
application=gluon.main.wsgibase
## or
# application=gluon.main.wsgibase_with_logging
WSGIServer(application).run()
- make this file executable by typing chmod +x dispatch.fcgi
- create or add the following lines to .htaccess:
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^dispatch\.fcgi/ - [L]
RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]
Now try and access the sub/domain on your browser and it should work!
The original of this document is here