码迷,mamicode.com
首页 > Web开发 > 详细

apache uwsgi django

时间:2014-12-18 01:39:10      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:blog   http   ar   io   os   on   div   log   bs   

http://projects.unbit.it/uwsgi/wiki/Example

  

[root@i projectname]# cat django_wsgi.py
import os
#substitute mysite with the name of your project !!!
os.environ[‘DJANGO_SETTINGS_MODULE‘] = ‘projectname.settings‘

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()

  

<VirtualHost *:80>
  <Location />
    SetHandler uwsgi-handler
    uWSGISocket 127.0.0.1:3031
  </Location>
</VirtualHost>

  

# cat uwsgi/uwsgi.xml 
<uwsgi>
  <socket>127.0.0.1:3031</socket>
  <chdir>/var/www/html/horizon</chdir>
  <pythonpath>..</pythonpath>
  <module>django_wsgi</module>
</uwsgi>

  

apache uwsgi django

标签:blog   http   ar   io   os   on   div   log   bs   

原文地址:http://www.cnblogs.com/jachin/p/4170786.html

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