作者:手机用户2602931985 | 来源:互联网 | 2023-05-17 01:25
Ihavebeensoldonmod_wsgiandapacheratherthanmod_python.Ihaveallthepartsinstalled(djan
I have been sold on mod_wsgi and apache rather than mod_python. I have all the parts installed (django, apache, mod_wsgi) but have run into a problem deploying.
我已经在mod_wsgi和apache而不是mod_python上出售了。我安装了所有部件(django,apache,mod_wsgi)但是遇到了部署问题。
I am on osx 10.5 with apache 2.2 and django 1.0b2, mod_wsgi-2.3
我在osx 10.5上使用apache 2.2和django 1.0b2,mod_wsgi-2.3
My application is called tred.
我的应用程序叫做tred。
Here are the relevant files: httpd-vhosts (included in httpd-conf)
以下是相关文件:httpd-vhosts(包含在httpd-conf中)
NameVirtualHost tred:80
ServerName tred
Alias /admin_media /usr/lib/python2.5/site-packages/django/contrib/admin/media
Order allow,deny
Allow from all
Alias /media /Users/dmg/Sites/tred/media
Order allow,deny
Allow from all
Alias / /Users/dmg/Sites/tred/
Order allow,deny
Allow from all
WSGIScriptAlias / /Users/dmg/Sites/tred/mod_wsgi-handler.wsgi
WSGIDaemonProcess tred user=dmg group=staff processes=1 threads=10
WSGIProcessGroup tred
mod_wsgi-handle.wsgi
mod_wsgi的-handle.wsgi
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/..')
os.environ['DJANGO_SETTINGS_MODULE'] = 'tred.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
When I go to http://tred I get a directory listing rather than the rendered website. I think I have followed the tutorials correctly but it is obviously not right. What can I do to make this work?
当我去http:// tred时,我得到一个目录列表而不是渲染的网站。我想我已经正确地遵循了教程,但显然不对。我能做些什么来完成这项工作?
4 个解决方案