版本注意事项
apache2.2
python2.6
django1.6
sudo vim /etc/apache2/apache2.conf
WSGIScriptAlias / /var/www/html/mysite/mysite/wsgi.py
<Directory "/var/www/html/mysite"> AllowOverride All Order deny,allow Allow from all</Directory>Alias /static/ /var/www/html/mysite/mysite/static/
<Directory "/var/www/html/mysite/mysite/static/"> AllowOverride All Order deny,allow Allow from all</Directory> sudo vim wsgi.pyimport os,sys
path='/var/www/html/mysite/'
sys.path.append(path)os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()