我试图在基于IIS的服务器上使用Django运行一个站点。我遵循主站点(http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer)上的所有说明,并使用一篇非常好的文章(http://www.messwithsilverlight.com/2009/11/django-on-windows-server-2003-and-iis6/)对其进行了双重检查。
我成功地设置了IIS来读取.py文件。按照主要指令,我可以让服务器呈现Info.py。然而,我似乎无法让IIS和Django表现得很好。例如,如果我的虚拟目录是"abc",那么如果我转到"localhost/abc/",浏览器只会向我显示该文件夹的内容目录。此外,如果我设置了urls以便"/dashboard/1“将我带到某个页面,输入"localhost/abc/dashboard/1”将给我一个“页面无法显示”错误。
我相当肯定IIS根本没有引用Django或与Django交互。有谁有办法解决这个问题吗?
谢谢
发布于 2013-01-11 13:15:13
这是我最初的指示,
基本说明:https://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer附加提示:http://whelkaholism.blogspot.ca/
从Lib\Site-Packages\Http
web_site\ django_project )和DJANGO_SETTINGS_MODULE (即对文件进行任何更改),在命令提示符中使用iisreset应用更改以下是你可能做的其他一些事情
web_site )开始。
最后,您在为CSS服务时可能会遇到困难。如果你有什么问题,告诉我,我会更新我的帖子。
发布于 2010-04-14 20:02:41
使用任何key服务器向Django提供服务基本上涉及三个关键细节:
python"
”。
如果您要为您的Virtual获取一个目录列表,那么您似乎应该调查VD设置,以确保为该目录配置了PyISAPIe (关键细节#1)。
从你提到的那篇文章来看:
- View the properties of the new folder and click on the "configuration" button (if it's greyed out, click 'create' first), then add a new wildcard extension (the lower box), locate the pyisapie.dll file and untick the "check that file exists" box.
- In the IIS Manager, go to the "Web Service Extensions" section, and right click -> add new web service extension.
https://stackoverflow.com/questions/2640066
复制相似问题