码迷,mamicode.com
首页 > 其他好文 > 详细

django mod_wsgi

时间:2014-10-11 17:51:25      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:io   os   ar   sp   on   html   ef   bs   htm   

版本注意事项

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.py

import 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()

django mod_wsgi

标签:io   os   ar   sp   on   html   ef   bs   htm   

原文地址:http://www.cnblogs.com/DDSys/p/4019039.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!