Updating apache contrib files.

Thanks to Gary Walborn for providing examples.
This commit is contained in:
Mathias Behrle
2014-09-13 19:28:24 +02:00
parent 29b5f36605
commit 75e99d62bb
2 changed files with 30 additions and 17 deletions

View File

@@ -1,20 +1,19 @@
<VirtualHost *:80>
# Uncomment if libapache2-mod-xsendfile is installed
# XSendFile On
# XSendFileAllowAbove On
# Uncomment if libapache2-mod-xsendfile is installed
# XSendFile On
# XSendFileAllowAbove On
ServerName mayan.yoursite.com
ServerAdmin admin@yoursite.com
DocumentRoot /var/www/mayan-edms
WSGIScriptAlias / /var/www/mayan-edms/mayan/mayan-edms.wsgi
WSGIScriptAlias / /usr/share/mayan/mayan/wsgi/dispatch.wsgi
<Directory /usr/share/mayan/mayan>
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/mayan_error.log
LogLevel warn
CustomLog /var/log/apache2/mayan_access.log combined
Alias /mayan-static "/usr/share/mayan/mayan/static/"
<Location "/static">
SetHandler None
</Location>
<Directory /var/www/mayan-edms>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/mayan-edms/media/static
<Location "/static">
SetHandler None
</Location>
</VirtualHost>

View File

@@ -0,0 +1,14 @@
# sample wsgi file for usage with apache webserver
# mayan installation in a virtualenv /opt/mayan/venv
# apache deployment in /var/www/mayan-edms
import os
import sys
import site
# set up python path to virtual environment
site.addsitedir(/opt/mayan/venv/lib/python2.7/site-packages)
sys.path.append(/var/www/mayan-edms)
os.environ[PYTHON_EGG_CACHE]=/var/www/django/cache
#django WSGI specifics
From django.core.handlers.wsgi import WSGIHandler
os.environ[DJANGO_SETTING_MODULE] = mayan.settings.production
application = WSGIHandler()