[howto]Install_mod_python_win2k
来源:互联网 发布:网络教育统考有作弊吗 编辑:程序博客网 时间:2024/05/16 11:30
在win2k下安装mod_python
环境:
apache_2.0.50-win32-x86-no_ssl.msi
python 2.3
mod_python-3.1.3.win32-py2.3.exe
安装完后没有发现mod_python.so
拷贝C:/Python23/Lib/site-packages/mod_python_so.pyd
为C:/Apache/Apache2/modules/mod_python.so
打开httpd.conf
加入 LoadModule python_module modules/mod_python.so
设置测试目录的AllowOverride至少为fileinfo.
<Directory "C:/Apache/Apache2/cgi-bin">
AllowOverride All
Options None
Order allow,deny
Allow from all
</Directory>
添加
<Directory "C:/Apache/Apache2/cgi-bin">
AddHandler mod_python .py
PythonHandler first
PythonDebug On
</Directory>
其中first就是指测试文件为C:/Apache/Apache2/cgi-bin/first.py
#!python
# filename: first.py
from mod_python import apache
def handler(req):
req.content_type = "text/plain"
req.write("Hello world")
return apache.OK
启动apache,打开浏览器输入
http://localhost:8080/cgi-bin/first.py
- [howto]Install_mod_python_win2k
- HowTo
- JET Howto
- kernel howto
- HOWTO MPlayer
- APT HOWTO
- Framebuffer HOWTO
- p2psim:howto
- NHibernate Howto
- MogileFS HOWTO
- Makefile Howto
- NDK HOWTO
- LVS-HOWTO
- SquashFS HOWTO
- Dstile howto
- udev -- howto
- jNative Howto
- SquashFS Howto
- 得到光标在文本域中的位置
- Tomcat学习日记(-)
- 将记录集转换成二维数组或特殊字符串
- 自古逢秋悲寂寥,昨日夜雨做成秋了。
- 分析数据库的一些方法
- [howto]Install_mod_python_win2k
- 关于ROWID分页中,执行计划的错误选择与处理(一)
- 致力营造“生态圈”——移动梦网营销成功的背后(转)
- [BLOG] 我的Blog定制效果和方法
- 《IT时代周刊》:WAPI,中国能顶得住吗?
- 原来〈hr〉还有这个用处,直接用作虚线
- 神仙表
- 为什么在网页中使用alert("我是中国人");会谈出乱码
- XML Schema学习笔记(一)