From 1c80526e14fbf32cca6ec5cc14c36046e09a4342 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Tue, 29 Apr 2014 22:58:43 +0800 Subject: * added 'DEPLOYMENT.md': notes about deployment * added 'APACHE2_skaschool.conf': configuration for apache2 (>=2.2) * renamed LICENSE to LICENSE.txt --- APACHE2_skaschool.conf | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 APACHE2_skaschool.conf (limited to 'APACHE2_skaschool.conf') diff --git a/APACHE2_skaschool.conf b/APACHE2_skaschool.conf new file mode 100644 index 0000000..29902fb --- /dev/null +++ b/APACHE2_skaschool.conf @@ -0,0 +1,62 @@ +### django_skaschool configuration for apache2 ### + +WSGIScriptAlias / /opt/www/skaschool/django_skaschool/django_skaschool/wsgi.py + +## embedded mode +#WSGIPythonPath /opt/www/skaschool/django_skaschool:/opt/www/skaschool/env_skaschool/lib/python2.7/site-packages + +## daemon mode +WSGIDaemonProcess skaschool python-path=/opt/www/skaschool/django_skaschool:/opt/www/skaschool/env_skaschool/lib/python2.7/site-packages +WSGIProcessGroup skaschool +WSGIApplicationGroup skaschool + +# If apache version >= 2.4: +# Require all granted +# else, also add two more lines: +# Allow from all +# Order deny,allow + + + Allow from all + Order deny,allow + + + + +## serving files + +# robots.txt and favicon.ico +Alias /robots.txt /opt/www/skaschool/static_root/robots.txt +Alias /favicon.ico /opt/www/skaschool/static_root/favicon.ico + +# css +AliasMatch ^/([^/]*\.css) /opt/www/skaschool/static_root/css/$1 + +# serving static and media files +Alias /static/ /opt/www/skaschool/static_root/ +Alias /media/ /opt/www/skaschool/media_root/ + + + Allow from all + Order deny,allow + + + + Allow from all + Order deny,allow + + +## user authentication required to access '/media/account/' +# requires apache >= 2.2 +# the wsgi script need to contain a 'check_password' function +#WSGIProcessGroup %{GLOBAL} +#WSGIApplicationGroup skaschool + + + AuthType Basic + AuthName "UserMeida" + AuthBasicProvider wsgi + WSGIAuthUserScript /opt/www/skaschool/django_skaschool/django_skaschool/wsgi.py + Require valid-user + + -- cgit v1.2.2