在IIS7或以上版本配置Python

1. Please make sure Python is installed properly.

请确保Python已经正确安装

2. Make sure CGI moduleis installed in IIS 7

确保IIS7开启了CGI

Control 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 clickDefault Web Site->Add Application, settingAliase.g.: PythonApp, and make it pointing to some folder like C:\PythonApp, then clickOK

为Python添加一个web应用程序。这一步就是在IIS创建一个网站,指定到你的Python应用程序目录。

4.InFeatures View,openHandler Mappings, right click toAdd Script Map ...

在功能视图下打开“处理映射”,右击“添加程序映射”

5. InRequestpath, put "*.py" as the script files extension, InExecutableselect "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 arethese two parameters used for. Then giving the script mapping anappropriate Name, like Python. ClickOK.

在弹出的窗口中,”请求路径“填写"*.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. InBrowse View, right click browseto verify it.

在IIS中打开浏览视图并右击文件进行验证。

原文:http://forums.iis.net/t/1122937.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值