Created
January 3, 2012 13:25
-
-
Save revolunet/1554877 to your computer and use it in GitHub Desktop.
sample flask+apache2+wsgi setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName flask.revolunet.com | |
WSGIScriptAlias / /home/git/flask_app/run.wsgi | |
WSGIScriptReloading On | |
<Directory /home/git/flask_app> | |
Order deny,allow | |
Allow from all | |
</Directory> | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import sys | |
# virtualenv activation if any | |
activate_this = '/home/envs/supaenv/bin/activate_this.py' | |
execfile(activate_this, dict(__file__=activate_this)) | |
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) | |
sys.path.insert(0, PROJECT_ROOT) | |
from myapp import app as application |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!! Super helpful, especially the sys.path.insert line.