diff --git a/contrib/apache/mayan b/contrib/apache/mayan index 01c38ad146..4c880f586e 100644 --- a/contrib/apache/mayan +++ b/contrib/apache/mayan @@ -1,20 +1,19 @@ - # 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 - - - Order deny,allow - Allow from all - - 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/" - - SetHandler None - + + Order allow,deny + Allow from all + + + Alias /static /var/www/mayan-edms/media/static + + SetHandler None + diff --git a/contrib/apache/mayan-edms.wsgi b/contrib/apache/mayan-edms.wsgi new file mode 100644 index 0000000000..c917f319df --- /dev/null +++ b/contrib/apache/mayan-edms.wsgi @@ -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() diff --git a/contrib/nginx/mayan_uwsgi.conf b/contrib/nginx/mayan_uwsgi.conf new file mode 100644 index 0000000000..9d272c9729 --- /dev/null +++ b/contrib/nginx/mayan_uwsgi.conf @@ -0,0 +1,19 @@ +server { + listen 80; + listen [::]:80 ipv6only=on; + server_name mayan; + access_log /var/log/nginx/access_mayan.log; + error_log /var/log/nginx/error_mayan.log; + + location / { + uwsgi_pass unix:///run/uwsgi/app/mayan/socket; + include uwsgi_params; + uwsgi_param UWSGI_SCHEME $scheme; + uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; + } + + location /static/ { + root /srv/mayan/projects/mayan/mayan-edms/mayan/media/; + } + +} diff --git a/contrib/uwsgi/mayan.ini b/contrib/uwsgi/mayan.ini new file mode 100644 index 0000000000..fc641f1f84 --- /dev/null +++ b/contrib/uwsgi/mayan.ini @@ -0,0 +1,14 @@ +# Sample file for uswgi with mayan installed in a virtualenv mayan +# with project directory mayan e.g. for use with nginx connecting via +# local unix socket +[uwsgi] +#socket = 127.0.0.1:3031 +plugin = python +chdir = /srv/mayan/projects/mayan/mayan-edms +virtualenv = /srv/mayan/.virtualenvs/mayan +env = DJANGO_SETTINGS_MODULE=mayan.settings.production +module = django.core.handlers.wsgi:WSGIHandler() +processes = 4 +threads = 2 +stats = :9191 +buffer-size=32768 \ No newline at end of file