Apache2.4 + ubuntu +
<VirtualHost *:80>
ServerName m.roothan.com
#ServerAlias b.roothan.com a.roothan.com
ServerAdmin actanble@163.com
#Alias /robots.txt /home/water/mysite2/static/robots.txt
#Alias /favicon.ico /home/water/mysite2/static/favicon.ico
Alias /media/ /home/water/mysite2/media/
Alias /static/ /home/water/mysite2/collect_static/
<Directory /home/water/mysite2/media>
Require all granted
</Directory>
<Directory /home/water/mysite2/collect_static>
Require all granted
</Directory>
WSGIScriptAlias / /home/water/mysite2/minicms/wsgi.py
# WSGIDaemonProcess mysite2 python-home=/home/water/venv3 python-path=/home/water/mysite2:/home/water/venv3/lib/python3.4/site-packages
# WSGIProcessGroup actanble.com
<Directory /home/water/mysite2/minicms>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
WSGIPythonpath /home/water/mysite2
wsgi.py
import os
from os.path import join,dirname,abspath
PROJECT_DIR = dirname(dirname(abspath(__file__)))
import sys
sys.path.insert(0,PROJECT_DIR)
os.environ["DJANGO_SETTINGS_MODULE"] = "minicms.settings"
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()