KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a VPS running a fresh install of Ubuntu 10.04 LTS. I'm trying to set up a live application using the Flask microframework, but it's giving me trouble. I took notes while I tried to get it running and here's my play-by-play in an effort to pinpoint exactly where I went wrong. INSTALLATION http://flask.pocoo.org/docs/installation/#installation $ adduser myapp $ sudo apt-get install python-setuptools $ sudo easy_install pip $ sudo pip install virtualenv /home/myapp/ -- www/ $ sudo pip install virtualenv /home/myapp/ -- www/ -- env/ $ . env/bin/activate $ easy_install Flask MOD_WSGI http://flask.pocoo.org/docs/deploying/mod_wsgi/ $ sudo apt-get install apache2 $ sudo apt-get install libapache2-mod-wsgi Creating WSGI file $ nano /home/myapp/www/myapp.wsgi --myapp.wsgi contents:-------------------------- activate_this = '/home/myapp/env/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) from myapp import app as application /home/myapp/ -- www/ -- myapp.wsgi -- env/ Configuring Apache $ nano /etc/apache2/sites-available/myapp.com -----myapp.com file contents --------------------- <VirtualHost *:80> ServerName myapp.com WSGIDaemonProcess myapp user=myapp group=myapp threads=5 python-path=/home/myapp/env/lib/python2.6/site-packages WSGIScriptAlias / /home/myapp/www/myapp.wsgi <Directory /home/myapp/www> WSGIProcessGroup myapp WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> </VirtualHost> Enable the virtual host file I just created $ cd /etc/apache2/sites-enabled
Tags (comma-separated)
Save Edits
Cancel