@@ -1,20 +1,19 @@
|
|||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
# Uncomment if libapache2-mod-xsendfile is installed
|
# Uncomment if libapache2-mod-xsendfile is installed
|
||||||
# XSendFile On
|
# XSendFile On
|
||||||
# XSendFileAllowAbove 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 /var/www/mayan-edms>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
<Directory /usr/share/mayan/mayan>
|
Alias /static /var/www/mayan-edms/media/static
|
||||||
Order deny,allow
|
<Location "/static">
|
||||||
Allow from all
|
SetHandler None
|
||||||
</Directory>
|
</Location>
|
||||||
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>
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|||||||
14
contrib/apache/mayan-edms.wsgi
Normal file
14
contrib/apache/mayan-edms.wsgi
Normal 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()
|
||||||
19
contrib/nginx/mayan_uwsgi.conf
Normal file
19
contrib/nginx/mayan_uwsgi.conf
Normal file
@@ -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/;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
14
contrib/uwsgi/mayan.ini
Normal file
14
contrib/uwsgi/mayan.ini
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user