Configure python in iis7

Source: Internet
Author: User

1. Install python-2.5.2.msi

The latest python3.0 is not used here because Google app engree currently runs version 2.5 on the server.

2. Install ActivePython-2.5.2.2-win32-x86.msi

3. Set c: \ python25 \ python.exe % S % s in site ISAPI and CGI restrictions.

4. Add "*. py" to c: \ python25 \ python.exe % S % s ing to the handler ings of the site.

 

5. After the preceding settings, add the following records to the Web. config file:

<? XML version = "1.0" encoding = "UTF-8" ?>
< Configuration >
< System. Webserver >
< Handlers >
< Add Name = "Activestate2.5.2" Path = "*. Py" Verb = "*" Modules = "Cgimodule"  
Scriptprocessor = "C: \ python25 \ python.exe % S % s" Resourcetype = "Unspecified"   />
</ Handlers >
</ System. Webserver >
</ Configuration >

6. Compile helloworld. py

Print   ' Status: 200 OK '
Print   ' Content-Type: text/html '
Print   ''
Print   ' <HTML> '
Print   ' <Body> '
Print   ' <H1> Hello, world! </H1> '
Print   ' </Body> '
Print   ' </Html> '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.