Commit 3e8a4e1bbce7a594b0e934822c6cc5618ea30a0c
1 parent
2e390588
Exists in
master
Add configuration files for apache
Showing
4 changed files
with
43 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,28 @@ |
1 | +<VirtualHost *:80> | |
2 | + ServerName localhost | |
3 | + | |
4 | + WSGIDaemonProcess pybossa user=user1 group=group1 threads=5 | |
5 | + WSGIScriptAlias /pybossa <path-to-project>/contrib/pybossa.wsgi | |
6 | + | |
7 | + <Directory <path-to-project>> | |
8 | + WSGIProcessGroup pybossa | |
9 | + WSGIApplicationGroup %{GLOBAL} | |
10 | + Order deny,allow | |
11 | + Allow from all | |
12 | + Require all granted | |
13 | + </Directory> | |
14 | + | |
15 | + Alias /pybossa <path-to-project>/view | |
16 | + <Directory <path-to-project>/view> | |
17 | + Order deny,allow | |
18 | + Allow from all | |
19 | + Require all granted | |
20 | + </Directory> | |
21 | + | |
22 | + Header set Access-Control-Allow-Origin "*" | |
23 | + | |
24 | + ServerAdmin webmaster@localhost | |
25 | + | |
26 | + ErrorLog ${APACHE_LOG_DIR}/error.log | |
27 | + CustomLog ${APACHE_LOG_DIR}/access.log combined | |
28 | +</VirtualHost> | ... | ... |
... | ... | @@ -0,0 +1,10 @@ |
1 | +# Check the official documentation http://flask.pocoo.org/docs/deploying/mod_wsgi/ | |
2 | +# Activate the virtual env (we assume that virtualenv is in the env folder) | |
3 | +activate_this = '<path-to-project>/env/bin/activate_this.py' | |
4 | +execfile(activate_this, dict(__file__=activate_this)) | |
5 | +# Import sys to add the path of PyBossa | |
6 | +import sys | |
7 | +sys.path.insert(0,'<path-to-project>') | |
8 | + | |
9 | +# Run the web-app | |
10 | +from run import app as application | ... | ... |