简体   繁体   English

mod_wsgi和Django部署

[英]mod_wsgi and django deployment

I have mod_wsgi installed and everything works on my development server. 我已经安装了mod_wsgi,并且一切都可以在我的开发服务器上运行。 I am running centos and cant seem to figure out what to add to my httpd.conf. 我正在运行centos,似乎无法弄清楚要添加到我的httpd.conf中的内容。 Is the mysite.com like my main url that I am going to be sending requests from? mysite.com是否像我要发送请求的主要网址一样? so should /path/to/mysite.com be /home/dbs/www ? 所以/path/to/mysite.com应该是/home/dbs/www吗? Lets assume my main domain is hello.com and is located at /home/dbs/www My wsgi.py path is correct. 假设我的主域是hello.com,并且位于/home/dbs/www我的wsgi.py路径正确。

this is what I have so far 这就是我到目前为止

WSGIScriptAlias / /home/pycode/main/main/wsgi.py
WSGIPythonPath /path/to/mysite.com

<Directory /path/to/mysite.com/mysite>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>

Maybe you should go watch: 也许您应该去看:

http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations

as an introduction and explanation of common problems. 作为常见问题的介绍和解释。

It does not cover the specifics though of how particular Linux distros reorganise the Apache configuration files compare to official Apache Software Foundation layout. 尽管与Linux正式发行版相比,特定的Linux发行版如何重新组织Apache配置文件,但并未涵盖细节。

Also, the presentation covers Django as configuration was done before 1.4. 此外,该演示文稿介绍了Django,因为配置是在1.4之前完成的。 The general layout you have above is for Django 1.4 and so you will need to adjust what is covered in presentation to newer Django 1.4 way of doing things. 上面的常规布局适用于Django 1.4,因此您需要将演示文稿中介绍的内容调整为更新的Django 1.4的工作方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM