|
Written by Administrator
|
|
Friday, 09 April 2010 |
|
Deploying on Dreamhost using Passenger WSGI. It's a consolidation of several other posts. - From your home folder, install virtualenv. This will allow us to add modules to Python by creating a virtual environment in our home folder:
wget http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.4.5.tar.gz tar xzf virtualenv-1.4.5.tar.gz python2.5 virtualenv-1.4.5/virtualenv.py $HOME/local
- Add your new ~/local/bin folder to the beginning of your PATH so it takes priority:
PATH="$HOME/local/bin:$PATH" export PATH
|
|
Last Updated ( Friday, 09 April 2010 )
|
|
Read more...
|
|
|
Written by Administrator
|
|
Friday, 09 April 2010 |
Install Web2py. Ease way using WSGI
Here are the steps I took to get web2py working with wsgi:
1. Install python 2.6 2. Created a subdomain like: web2py.mydomain.com. When creating the new domain, make sure to check enable "Ruby on Rails Passenger ". 3. Download and extract web2py. 4. Create a symlink as follows: ln -s wsgihandler.py passenger_wsgi.py. 5. Add the following to wsgihandler.py :
import sys import os
INTERP = "/home/username/opt/bin/python" if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv) |
|
Last Updated ( Friday, 09 April 2010 )
|
|
|
Written by Administrator
|
|
Wednesday, 18 March 2009 |
|
Web2py is a Python web framework. - Install Python 2.5 or 2.6
- 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:
#!/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
-
- create or add the following lines to .htaccess:
RewriteEngine On RewriteBase / RewriteRule ^dispatch\.fcgi/ - [L] RewriteRule ^(.*)$ dispatch.fcgi/$1 [L]
Try and access the domain on your browser and work! |
|
Last Updated ( Friday, 09 April 2010 )
|
|
Read more...
|
|
|
|
<< Start < Prev 1 2 3 Next > End >>
|
| Results 1 - 4 of 12 |