sky 发表于 2013-3-27 09:12:00

在IIS7或以上版本配置Python

1. Please make sure Python is installed properly.请确保Python已经正确安装2. Make sure CGI module is installed in IIS 7 确保IIS7开启了CGIControl Panel -> Programs -> Program and Features -> Turn Windows features on and off -> Internet Information Services -> World Wide Web Services -> Application Development Features -> CGI module.控制面板--程序--程序和功能--打开关闭系统功能--IIS--WWW服务--应用程序开发功能--CGI(我用英文系统,不一定翻译恰当)3. Add web application for Python, In IIS Manager, right click Default Web Site -> Add Application, setting Alias e.g.: PythonApp, and make it pointing to some folder like C:\PythonApp, then click OK为Python添加一个web应用程序。这一步就是在IIS创建一个网站,指定到你的Python应用程序目录。4. In Features View, open Handler Mappings, right click to Add Script Map ...在功能视图下打开“处理映射”,右击“添加程序映射”5. In Request path, put "*.py" as the script files extension, In Executable select "C:\Python25\Python.exe %s %s", here is my Python installation path and its parameters, this is mentioned in the KB article, you can check what are these two parameters used for. Then giving the script mapping an appropriate Name, like Python. Click OK.在弹出的窗口中,”请求路径“填写"*.py"作为Python的扩展名。在”可执行"填写你的Python安装目录,最后以"Python.exe %s %s"结尾。"名称“任意填,如”Python“。最后点击确定。6. Create or copy a test.py into the virtual directory (C:\PythonApp), you can find it in the KB article.在你的Python应用程序目录下创建测试文件。7. In Browse View, right click browse to verify it.在IIS中打开浏览视图并右击文件进行验证。原文:http://forums.iis.net/t/1122937.aspx

czhtr 发表于 2013-3-27 09:27:03

吃饭与ml是第一生产力。

2168575 发表于 2013-5-15 18:05:34

关羽五绺长髯,风度翩翩,手提青龙偃月刀,江湖人送绰号——刀郎。

jmton 发表于 2013-5-16 01:15:34

不错不错,楼主您辛苦了。。。

roger2001c 发表于 2013-5-16 10:20:20

过来看看的

浪人 发表于 2013-5-16 19:56:44

我妈常说,我们家要是没有电话就不会这么穷。

banbanbai 发表于 2013-5-17 05:28:37

有事秘书干,没事干秘书!
页: [1]
查看完整版本: 在IIS7或以上版本配置Python