You can use the following steps to install Pinax on your WebFaction account. The latest version of Pinax at the time of this writing is 0.9a2:
- Create a "mod_wsgi 3.3/Python 2.7" app in the control panel. In this example, app is named "pinax_server".
- SSH into your server and run the following commands:
cd ~/webapps/pinax_server
mkdir -p lib/python2.7
export PYTHONPATH=$PWD/lib/python2.7
easy_install-2.7 -s $PWD/bin -d $PWD/lib/python2.7 virtualenv
./bin/virtualenv mysite-env
source mysite-env/bin/activate
pip install Pinax
pinax-admin setup_project mysite
cd mysite
mkdir -p site_media/{media,static}
# edit settings.py to set your database config.
# if using sqlite, then use the full path to the db.
python manage.py syncdb
python manage.py collectstatic
- Edit
~/webapps/pinax_server/apache2/bin/start to add a line that activates your virtualenv when apache is started, eg:#!/bin/bash
source /home/username/webapps/pinax_server/mysite-env/bin/activate
LD_LIBRARY_PATH=/home/username/webapps/pinax_server/apache2/lib /home/username/webapps/pinax_server/apache2/bin/httpd.worker -f /home/username/webapps/pinax_server/apache2/conf/httpd.conf -k start
- Add the following line to the end of your
~/webapps/pinax_server/apache2/conf/httpd.confWSGIScriptAlias / /home/username/webapps/pinax_server/mysite/wsgi.py
- Restart your Apache.
- In the control panel, create a new "Symbolic link to static-only app" application using "
/home/username/webapps/pinax_server/mysite/site_media" in the "extra info" field.
- In the control panel, configure your site to serve the "pinax_server" app on the root URL path "/", and the symlink app on URL path "/site_media".
- Wait a few minutes for the control panel changes to take effect, and you're done.
answered
May 05 '12 at 17:34
seanf ♦♦
5949●1●2●20