-
Notifications
You must be signed in to change notification settings - Fork 0
/
default_wsgi_script.txt
53 lines (47 loc) · 1.88 KB
/
default_wsgi_script.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
## WSGI Setup ##
### Don't import any modules until the virtual environment is activated
FULL_PATH_TO_YOUR_APP = '/Users/baw/Sites/app.bikeandwalk.org'
## Activate the virtualenv
activate_this = FULL_PATH_TO_YOUR_APP + '/env/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
import sys
## put the app into the python path
sys.path.insert(0, FULL_PATH_TO_YOUR_APP)
from bikeandwalk import app as application
##Sample vhosts.conf entry:
######################################
## Notes on the apache setup:
## a directive like this must be in the MAIN http.confg file...
## WSGIPythonHome /Users/bleddy/Sites/bikeandwalk.org/app/env
##
## Create a virgin virualenv with
## virtualenv --no-site-packages --python=python2.6 env
## (my version of mod_wsgi was built for python 2.6 so need match in virtualenv)
##
# <VirtualHost *:80>
# ServerName app.yourdomain.com
# ServerAdmin [email protected]
#
# DocumentRoot "/Users/user/Sites/app.bikandwalk.org"
#
# # Add static directory alias
# AliasMatch ^/(static/.*)$ /Users/user/Sites/app.bikandwalk.org/$1
#
# # user should be non-priveliged, not a sudoer but with write privileges in the app directory
# WSGIDaemonProcess bikeandwalk user=baw group=staff threads=5
# WSGIScriptAlias / /Users/user/Sites/app.bikeandwalk.org/apache/bikeandwalk.wsgi
#
# ## a directive like this must be in the MAIN http.confg file...
# ## WSGIPythonHome /usr/local/pythonenv/BASELINE_2.6
#
# <Directory /Users/user/Sites/app.bikeandwalk.org>
# WSGIProcessGroup bikeandwalk
# WSGIApplicationGroup %{GLOBAL}
# Order deny,allow
# Allow from all
# </Directory>
#
# CustomLog "/Library/Logs/Apache2/bikeandwalk.app.access_log" common
# ErrorLog "/Library/Logs/Apache2/bikeandwalk.app.error_log"
# </VirtualHost>
#########################################################