安装Vertrigo,Python
配置文件
在文件 vertrigo.conf 中添加python的web项目的配置信息
<Directory "d:\python">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Require all granted
DirectoryIndex index.py
</Directory>
AddHandler cgi-script .cgi .py
Alias /python "d:\python"
编写测试文件
编写文件index.py,保存到 d:\python 目录下
#!C:\Python27\python.exe
# -*- coding: utf-8 -*-
# filename: index.py
print "Content-Type: text/html\n\n";
print "This is a test page for python";