From 3e8a4e1bbce7a594b0e934822c6cc5618ea30a0c Mon Sep 17 00:00:00 2001 From: André Araújo Date: Tue, 3 May 2016 16:56:55 -0300 Subject: [PATCH] Add configuration files for apache --- contrib/apache/pybossa.conf.tmpl | 28 ++++++++++++++++++++++++++++ contrib/pybossa.wsgi.tmpl | 10 ++++++++++ uploads/.gitignore | 5 +++++ uploads/user_1/.gitempty | 0 4 files changed, 43 insertions(+), 0 deletions(-) create mode 100644 contrib/apache/pybossa.conf.tmpl create mode 100755 contrib/pybossa.wsgi.tmpl create mode 100644 uploads/.gitignore create mode 100644 uploads/user_1/.gitempty diff --git a/contrib/apache/pybossa.conf.tmpl b/contrib/apache/pybossa.conf.tmpl new file mode 100644 index 0000000..5a68417 --- /dev/null +++ b/contrib/apache/pybossa.conf.tmpl @@ -0,0 +1,28 @@ + + ServerName localhost + + WSGIDaemonProcess pybossa user=user1 group=group1 threads=5 + WSGIScriptAlias /pybossa /contrib/pybossa.wsgi + + > + WSGIProcessGroup pybossa + WSGIApplicationGroup %{GLOBAL} + Order deny,allow + Allow from all + Require all granted + + + Alias /pybossa /view + /view> + Order deny,allow + Allow from all + Require all granted + + + Header set Access-Control-Allow-Origin "*" + + ServerAdmin webmaster@localhost + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + diff --git a/contrib/pybossa.wsgi.tmpl b/contrib/pybossa.wsgi.tmpl new file mode 100755 index 0000000..7a118cf --- /dev/null +++ b/contrib/pybossa.wsgi.tmpl @@ -0,0 +1,10 @@ +# Check the official documentation http://flask.pocoo.org/docs/deploying/mod_wsgi/ +# Activate the virtual env (we assume that virtualenv is in the env folder) +activate_this = '/env/bin/activate_this.py' +execfile(activate_this, dict(__file__=activate_this)) +# Import sys to add the path of PyBossa +import sys +sys.path.insert(0,'') + +# Run the web-app +from run import app as application diff --git a/uploads/.gitignore b/uploads/.gitignore new file mode 100644 index 0000000..0ac22e4 --- /dev/null +++ b/uploads/.gitignore @@ -0,0 +1,5 @@ +# Ignore everything in this directory +* +!*.gitignore +!*.gitempty +!user_1/ diff --git a/uploads/user_1/.gitempty b/uploads/user_1/.gitempty new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/uploads/user_1/.gitempty -- libgit2 0.21.2