Created
June 27, 2013 23:38
-
-
Save cpdean/5881331 to your computer and use it in GitHub Desktop.
wsgi apache setup with error logging and virtualenv
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
import sys | |
sys.stdout = sys.stderr | |
sys.path.insert(0,'/home/user/public/appname.example.com/public/appname') | |
activate_this = '/home/user/public/appname.example.com/public/appname/appvirtualenv/bin/activate_this.py' | |
execfile(activate_this, dict(__file__=activate_this)) | |
from app import app as application |
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
# domain: appname.example.com | |
# public: /home/user/public/appname.example.com/ | |
<VirtualHost *:8080> | |
ServerAdmin [email protected] | |
ServerName appname.example.com | |
ServerAlias appname.example.com | |
WSGIDaemonProcess appname | |
WSGIScriptAlias / /home/user/public/appname.example.com/public/appname/apache.wsgi | |
LogLevel warn | |
ErrorLog /home/user/public/appname.example.com/log/error.log | |
CustomLog /home/user/public/appname.example.com/log/access.log combined | |
<Directory /home/user/public/appname.example.com/public/appname > | |
WSGIProcessGroup appname | |
WSGIApplicationGroup %{GLOBAL} | |
Order deny,allow | |
Allow from all | |
</Directory> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment